Loading...
Searching...
No Matches
ledger::query_t::lexer_t::token_t Struct Reference

#include <query.h>

Public Types

enum  kind_t {
  UNKNOWN , LPAREN , RPAREN , TOK_NOT ,
  TOK_AND , TOK_OR , TOK_EQ , TOK_CODE ,
  TOK_PAYEE , TOK_NOTE , TOK_ACCOUNT , TOK_META ,
  TOK_EXPR , TOK_SHOW , TOK_ONLY , TOK_BOLD ,
  TOK_FOR , TOK_SINCE , TOK_UNTIL , TERM ,
  END_REACHED
}
 

Public Member Functions

void expected (char wanted)
 
 operator bool () const
 
token_toperator= (const token_t &tok)
 
string symbol () const
 
string to_string () const
 
 token_t (const token_t &tok)
 
 token_t (kind_t _kind=UNKNOWN, const optional< string > &_value=none)
 
 ~token_t () throw ()
 

Public Attributes

enum ledger::query_t::lexer_t::token_t::kind_t kind
 
optional< stringvalue
 

Detailed Description

Definition at line 71 of file query.h.

Member Enumeration Documentation

◆ kind_t

Enumerator
UNKNOWN 
LPAREN 
RPAREN 
TOK_NOT 
TOK_AND 
TOK_OR 
TOK_EQ 
TOK_CODE 
TOK_PAYEE 
TOK_NOTE 
TOK_ACCOUNT 
TOK_META 
TOK_EXPR 
TOK_SHOW 
TOK_ONLY 
TOK_BOLD 
TOK_FOR 
TOK_SINCE 
TOK_UNTIL 
TERM 
END_REACHED 

Definition at line 73 of file query.h.

Constructor & Destructor Documentation

◆ token_t() [1/2]

ledger::query_t::lexer_t::token_t::token_t ( kind_t _kind = UNKNOWN,
const optional< string > & _value = none )
inlineexplicit

Definition at line 106 of file query.h.

References TRACE_CTOR.

◆ token_t() [2/2]

ledger::query_t::lexer_t::token_t::token_t ( const token_t & tok)
inline

Definition at line 111 of file query.h.

References TRACE_CTOR.

◆ ~token_t()

ledger::query_t::lexer_t::token_t::~token_t ( )
throw ( )
inline

Definition at line 115 of file query.h.

References TRACE_DTOR.

Member Function Documentation

◆ expected()

void ledger::query_t::lexer_t::token_t::expected ( char wanted)

◆ operator bool()

ledger::query_t::lexer_t::token_t::operator bool ( ) const
inline

Definition at line 127 of file query.h.

References END_REACHED, and kind.

◆ operator=()

token_t & ledger::query_t::lexer_t::token_t::operator= ( const token_t & tok)
inline

Definition at line 119 of file query.h.

References ledger::downcast(), kind, and value.

+ Here is the call graph for this function:

◆ symbol()

string ledger::query_t::lexer_t::token_t::symbol ( ) const
inline

◆ to_string()

string ledger::query_t::lexer_t::token_t::to_string ( ) const
inline

Member Data Documentation

◆ kind

◆ value

optional<string> ledger::query_t::lexer_t::token_t::value

Definition at line 104 of file query.h.

Referenced by operator=(), and to_string().


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