81 std::string
line()
const;
98 static bool match_token_types(
const std::vector<Token>& a,
const std::vector<Token>& b,
int count);
101 std::string line_text;
const std::string token_strings[]
Definition: Token.cpp:4
std::vector< Token > TokenStream
Definition: Token.h:105
TokenType
Definition: Token.h:7
@ TT_Syscall5
Definition: Token.h:46
@ TT_LBracket
Definition: Token.h:23
@ TT_LessThan
Definition: Token.h:19
@ TT_RParen
Definition: Token.h:22
@ TT_Semicolon
Definition: Token.h:25
@ TT_Period
Definition: Token.h:32
@ TT_Equal
Definition: Token.h:18
@ TT_Minus
Definition: Token.h:14
@ TT_Syscall2
Definition: Token.h:43
@ TT_Keyword
Definition: Token.h:11
@ TT_Syscall4
Definition: Token.h:45
@ TT_NEqual
Definition: Token.h:36
@ TT_RBracket
Definition: Token.h:24
@ TT_GreaterThan
Definition: Token.h:20
@ TT_GTE
Definition: Token.h:30
@ TT_At
Definition: Token.h:17
@ TT_Type
Definition: Token.h:39
@ TT_Div
Definition: Token.h:16
@ TT_LSQB
Definition: Token.h:37
@ TT_Path
Definition: Token.h:34
@ TT_Mul
Definition: Token.h:15
@ TT_Syscall1
Definition: Token.h:42
@ TT_Plus
Definition: Token.h:13
@ TT_Identifier
Definition: Token.h:8
@ TT_LoadedString
Definition: Token.h:26
@ TT_Syscall3
Definition: Token.h:44
@ TT_LParen
Definition: Token.h:21
@ TT_Syscall0
Definition: Token.h:41
@ TT_Equals
Definition: Token.h:29
@ TT_Null
Definition: Token.h:28
@ TT_EOF
Definition: Token.h:27
@ TT_Exclamation
Definition: Token.h:35
@ TT_LTE
Definition: Token.h:31
@ TT_Import
Definition: Token.h:40
@ TT_String
Definition: Token.h:12
@ TT_Comma
Definition: Token.h:33
@ TT_CompilerMacro
Definition: Token.h:47
@ TT_Float
Definition: Token.h:10
@ TT_Number
Definition: Token.h:9
@ TT_RSQB
Definition: Token.h:38
Token copy_with_new_type(const TokenType &type)
Definition: Token.cpp:44
int int_value
Definition: Token.h:57
static bool match_token_types(const std::vector< Token > &a, const std::vector< Token > &b, int count)
Definition: Token.cpp:189
std::string string_value
Definition: Token.h:58
static void erase(Token &tk)
Definition: Token.cpp:184
Location loc
Definition: Token.h:61
~Token()
Definition: Token.cpp:40
std::string line() const
Definition: Token.cpp:157
std::string to_string() const
Definition: Token.cpp:57
static Token make_with_line(const Token &origin, const std::string &line_text)
Definition: Token.cpp:162
float float_value
Definition: Token.h:59
void operator=(const Token &other)
Definition: Token.cpp:175
Token(const TokenType &type)
Definition: Token.cpp:13
TokenType tk_type
Definition: Token.h:55