24 extern umap<TokenType, str> token_type_names;
25 extern const vector<str> KEYWORDS;
26 extern const vector<char> PUNCTUATIONS;
27 extern const vector<str> TERMINAL_TOKENS;
29 extern const vector<char> OP;
30 extern const vector<str> OP_ALL;
31 extern umap<str, TokenType> OPERATION_VALUE_TYPE_MAP;
41 Token(TokenType tokenType, uint32_t line, uint32_t col, str value,
SourceFile *src);
42 [[nodiscard]] TokenType get_type()
const;
43 void set_type(TokenType type);
44 [[nodiscard]]
const str &get_value()
const;
45 [[nodiscard]] str get_source_line()
const;
46 [[nodiscard]]
bool is_unsigned()
const;
47 void set_is_unsigned(
bool is_unsigned);
48 [[nodiscard]] uint32_t get_line()
const;
49 [[nodiscard]] uint32_t get_col()
const;
53 TokenType _type = TokenType::END;
57 bool _is_unsigned =
false;
A span of source code tokens, inclusive on both ends.