Empirical
|
Information about a token instance from an input stream. More...
#include <Lexer.h>
Public Member Functions | |
Token (size_t id, const std::string &str="") | |
Token (const Token &)=default | |
Token & | operator= (const Token &)=default |
operator size_t () | |
Token will automatically convert to its ID if used as an unsigned int. More... | |
operator const std::string & () | |
Token will automatically convert to its matched sequence (lexeme) is used as a string. More... | |
Public Attributes | |
size_t | token_id |
Which type of token is this? More... | |
std::string | lexeme |
The specific sequence matched by this token. More... | |
Information about a token instance from an input stream.
|
inline |
|
default |
|
inline |
Token will automatically convert to its matched sequence (lexeme) is used as a string.
|
inline |
Token will automatically convert to its ID if used as an unsigned int.
std::string emp::Token::lexeme |
The specific sequence matched by this token.
size_t emp::Token::token_id |
Which type of token is this?