Crossfire Server, Trunk
inja::Token Struct Reference

Helper-class for the inja Lexer. More...

#include <inja.hpp>

+ Collaboration diagram for inja::Token:

Public Types

enum  Kind {
  Kind::Text, Kind::ExpressionOpen, Kind::ExpressionClose, Kind::LineStatementOpen,
  Kind::LineStatementClose, Kind::StatementOpen, Kind::StatementClose, Kind::CommentOpen,
  Kind::CommentClose, Kind::Id, Kind::Number, Kind::String,
  Kind::Plus, Kind::Minus, Kind::Times, Kind::Slash,
  Kind::Percent, Kind::Power, Kind::Comma, Kind::Dot,
  Kind::Colon, Kind::LeftParen, Kind::RightParen, Kind::LeftBracket,
  Kind::RightBracket, Kind::LeftBrace, Kind::RightBrace, Kind::Equal,
  Kind::NotEqual, Kind::GreaterThan, Kind::GreaterEqual, Kind::LessThan,
  Kind::LessEqual, Kind::Unknown, Kind::Eof
}
 

Public Member Functions

std::string describe () const
 
constexpr Token ()=default
 
constexpr Token (Kind kind, nonstd::string_view text)
 

Data Fields

Kind kind {Kind::Unknown}
 
nonstd::string_view text
 

Detailed Description

Helper-class for the inja Lexer.

Definition at line 1787 of file inja.hpp.

Member Enumeration Documentation

◆ Kind

enum inja::Token::Kind
strong
Enumerator
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 

Definition at line 1788 of file inja.hpp.

Constructor & Destructor Documentation

◆ Token() [1/2]

constexpr inja::Token::Token ( )
explicitconstexprdefault

◆ Token() [2/2]

constexpr inja::Token::Token ( Kind  kind,
nonstd::string_view  text 
)
inlineexplicitconstexpr

Definition at line 1830 of file inja.hpp.

Member Function Documentation

◆ describe()

std::string inja::Token::describe ( ) const
inline

Definition at line 1832 of file inja.hpp.

References guild_entry::text.

Referenced by inja::Parser::parse_into(), and inja::Parser::parse_statement().

+ Here is the caller graph for this function:

Field Documentation

◆ kind

◆ text

nonstd::string_view inja::Token::text

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