Thorin 1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
thorin::ast::Lexer Class Reference

#include <thorin/ast/lexer.h>

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

Public Member Functions

 Lexer (AST &, std::istream &, const fs::path *path=nullptr, std::ostream *md=nullptr)
 Creates a lexer to read Thorin 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()

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

Creates a lexer to read Thorin 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, THORIN_KEY, and THORIN_SUBST.

Member Function Documentation

◆ ast()

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

Definition at line 24 of file lexer.h.

Referenced by lex().

◆ lex()

Tok thorin::ast::Lexer::lex ( )

Definition at line 31 of file lexer.cpp.

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

◆ loc()

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

Definition at line 26 of file lexer.h.

Referenced by lex().

◆ path()

const fs::path * thorin::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: