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

#include <thorin/fe/lexer.h>

Inheritance diagram for thorin::Lexer:
[legend]

Public Member Functions

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

Detailed Description

Definition at line 13 of file lexer.h.

Constructor & Destructor Documentation

◆ Lexer()

thorin::Lexer::Lexer ( World world,
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

◆ lex()

Tok thorin::Lexer::lex ( )

Definition at line 31 of file lexer.cpp.

References thorin::error(), loc(), and world().

◆ loc()

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

Definition at line 23 of file lexer.h.

Referenced by lex().

◆ path()

const fs::path * thorin::Lexer::path ( ) const
inline

Definition at line 22 of file lexer.h.

◆ world()

World & thorin::Lexer::world ( )
inline

Definition at line 21 of file lexer.h.

Referenced by lex().


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