3 #include "sapphirepch.h"
50 extern const std::string token_strings[];
58 std::string string_value;
63 Token(
const TokenType& type);
67 Token(
const TokenType& type,
const int& val,
const Location& location);
69 Token(
const TokenType& type,
const std::string& val,
const Location& location);
71 Token(
const TokenType& type,
const std::string& val);
73 Token(
const TokenType& type,
const float& val,
const Location& location);
78 std::string to_string()
const;
81 std::string line()
const;
85 static Token make_with_line(
const Token& origin,
const std::string& line_text);
87 void operator=(
const Token& other);
91 static void erase(
Token& tk);
94 Token copy_with_new_type(
const TokenType& type);
98 static bool match_token_types(
const std::vector<Token>& a,
const std::vector<Token>& b,
int count);
101 std::string line_text;
105 typedef std::vector<Token> TokenStream;