3 #include "simple_config_origin.hpp"
9 enum class token_type {
10 START, END, COMMA, EQUALS, COLON, OPEN_CURLY, CLOSE_CURLY, OPEN_SQUARE, CLOSE_SQUARE,
11 VALUE, NEWLINE, UNQUOTED_TEXT, IGNORED_WHITESPACE, SUBSTITUTION, PROBLEM, COMMENT, PLUS_EQUALS
20 token(token_type type, shared_origin origin =
nullptr,
21 std::string token_text =
"", std::string debug_string =
"");
23 virtual token_type get_token_type()
const;
24 virtual std::string token_text()
const;
25 virtual std::string to_string()
const;
26 virtual shared_origin
const& origin()
const;
28 int line_number()
const;
30 virtual bool operator==(
const token& other)
const;
33 token_type _token_type;
36 shared_origin _origin;
38 std::string _token_text;
39 std::string _debug_string;
42 using shared_token = std::shared_ptr<const token>;
43 using token_list = std::vector<shared_token>;