MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::ast::Lexer Class Reference

#include <mim/ast/lexer.h>

Inheritance diagram for mim::ast::Lexer:
[legend]

Public Member Functions

 Lexer (AST &, std::istream &, const fs::path *path=nullptr, std::ostream *md=nullptr)
 Creates a lexer to read *.mim files (see Lexical Structure).
 
ASTast ()
 
const fs::path * path () const
 
Loc loc () const
 
Tok lex ()
 

Friends

class fe::Lexer< 3, Lexer >
 

Detailed Description

Definition at line 16 of file lexer.h.

Constructor & Destructor Documentation

◆ Lexer()

mim::ast::Lexer::Lexer ( AST & ast,
std::istream & istream,
const fs::path * path = nullptr,
std::ostream * md = nullptr )

Creates a lexer to read *.mim files (see Lexical Structure).

If md is not nullptr, a Markdown output will be generated.

Definition at line 12 of file lexer.cpp.

References CODE, MIM_KEY, and MIM_SUBST.

Member Function Documentation

◆ ast()

AST & mim::ast::Lexer::ast ( )
inline

Definition at line 24 of file lexer.h.

Referenced by lex().

◆ lex()

Tok mim::ast::Lexer::lex ( )

Definition at line 31 of file lexer.cpp.

References ast(), mim::ast::AST::error(), and loc().

◆ loc()

Loc mim::ast::Lexer::loc ( ) const
inline

Definition at line 26 of file lexer.h.

Referenced by lex().

◆ path()

const fs::path * mim::ast::Lexer::path ( ) const
inline

Definition at line 25 of file lexer.h.

Friends And Related Symbol Documentation

◆ fe::Lexer< 3, Lexer >

friend class fe::Lexer< 3, Lexer >
friend

Definition at line 63 of file lexer.h.


The documentation for this class was generated from the following files: