Tensor Comprehensions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lang::Lexer Struct Reference

#include <lexer.h>

Collaboration diagram for lang::Lexer:

Public Member Functions

 Lexer (const std::string &str)
 
bool nextIf (int kind)
 
Token lookahead ()
 
Token next ()
 
void reportError (const std::string &what, const Token &t)
 
void reportError (const std::string &what)
 
Token expect (int kind)
 
Tokencur ()
 

Public Attributes

std::shared_ptr< std::string > file
 

Private Member Functions

Token lex ()
 

Private Attributes

size_t pos
 
Token cur_
 
std::unique_ptr< Tokenlookahead_
 
SharedParserDatashared
 

Constructor & Destructor Documentation

lang::Lexer::Lexer ( const std::string &  str)
inline

Member Function Documentation

Token& lang::Lexer::cur ( )
inline
Token lang::Lexer::expect ( int  kind)
inline
Token lang::Lexer::lex ( )
inlineprivate
Token lang::Lexer::lookahead ( )
inline
Token lang::Lexer::next ( )
inline
bool lang::Lexer::nextIf ( int  kind)
inline
void lang::Lexer::reportError ( const std::string &  what,
const Token t 
)
void lang::Lexer::reportError ( const std::string &  what)
inline

Member Data Documentation

Token lang::Lexer::cur_
private
std::shared_ptr<std::string> lang::Lexer::file
std::unique_ptr<Token> lang::Lexer::lookahead_
private
size_t lang::Lexer::pos
private
SharedParserData& lang::Lexer::shared
private

The documentation for this struct was generated from the following file: