sapphirec  0.1
The Sapphire compiler.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Token Struct Reference

Public Member Functions

 Token (const TokenType &type)
 
 Token (const TokenType &type, const Location &location)
 
 Token (const TokenType &type, const int &val, const Location &location)
 
 Token (const TokenType &type, const std::string &val, const Location &location)
 
 Token (const TokenType &type, const std::string &val)
 
 Token (const TokenType &type, const float &val, const Location &location)
 
std::string to_string () const
 
std::string line () const
 
void operator= (const Token &other)
 
Token copy_with_new_type (const TokenType &type)
 

Static Public Member Functions

static Token make_with_line (const Token &origin, const std::string &line_text)
 
static void erase (Token &tk)
 
static bool match_token_types (const std::vector< Token > &a, const std::vector< Token > &b, int count)
 

Public Attributes

TokenType tk_type
 
int int_value
 
std::string string_value
 
float float_value
 
Location loc
 

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