Helper-class for the inja Lexer. More...
#include <inja.hpp>
Public Types | |
| enum class | Kind { Text , ExpressionOpen , ExpressionClose , LineStatementOpen , LineStatementClose , StatementOpen , StatementClose , CommentOpen , CommentClose , Id , Number , String , Plus , Minus , Times , Slash , Percent , Power , Comma , Dot , Colon , LeftParen , RightParen , LeftBracket , RightBracket , LeftBrace , RightBrace , Equal , NotEqual , GreaterThan , GreaterEqual , LessThan , LessEqual , Unknown , Eof } |
Public Member Functions | |
| constexpr | Token ()=default |
| constexpr | Token (Kind kind, std::string_view text) |
| std::string | describe () const |
Public Attributes | |
| Kind | kind {Kind::Unknown} |
| std::string_view | text |
|
strong |
Definition at line 1025 of file inja.hpp.
|
explicitconstexprdefault |
|
inlineexplicitconstexpr |
Definition at line 1067 of file inja.hpp.
Referenced by inja::Lexer::make_token(), and inja::Lexer::scan().
|
inline |
Definition at line 1072 of file inja.hpp.
References Eof, kind, LineStatementClose, Text, and text.
Referenced by inja::Parser::parse_expression(), inja::Parser::parse_filename(), inja::Parser::parse_into(), and inja::Parser::parse_statement().
| Kind inja::Token::kind {Kind::Unknown} |
Definition at line 1063 of file inja.hpp.
Referenced by describe(), inja::Parser::parse_expression(), inja::Parser::parse_expression(), inja::Parser::parse_filename(), inja::Parser::parse_into(), inja::Parser::parse_statement(), and Token().
| std::string_view inja::Token::text |
Definition at line 1064 of file inja.hpp.
Referenced by inja::Parser::add_literal(), describe(), inja::Parser::parse_expression(), inja::Parser::parse_filename(), inja::Parser::parse_into(), inja::Parser::parse_statement(), and Token().