5 #include <ail/types.hpp>
6 #include <frith/variable.hpp>
14 lexeme_type_signed_integer
,
15 lexeme_type_unsigned_integer
,
16 lexeme_type_floating_point_value
,
20 lexeme_type_subtraction
,
21 lexeme_type_multiplication
,
25 lexeme_type_less_than
,
26 lexeme_type_less_than_or_equal
,
27 lexeme_type_greater_than
,
28 lexeme_type_greater_than_or_equal
,
32 lexeme_type_logical_not
,
34 lexeme_type_logical_and
,
35 lexeme_type_logical_or
,
37 lexeme_type_shift_left
,
38 lexeme_type_shift_right
,
40 lexeme_type_binary_and
,
41 lexeme_type_binary_or
,
42 lexeme_type_binary_xor
,
44 lexeme_type_binary_not
,
46 lexeme_type_bracket_left
,
47 lexeme_type_bracket_right
,
49 lexeme_type_array_left
,
50 lexeme_type_array_right
,
58 types::signed_integer signed_integer
;
59 types::unsigned_integer unsigned_integer
;
60 types::floating_point_value floating_point_value
;
65 lexeme(lexeme_type type
);
66 explicit lexeme(types::signed_integer signed_integer
);
67 explicit lexeme(types::unsigned_integer unsigned_integer
);
68 explicit lexeme(types::floating_point_value floating_point_value
);
69 explicit lexeme(lexeme_type type
, std::string
const & string
);
75 uword indentation_level
;
76 std::vector
<lexeme
> lexemes
;
81 struct operator_lexeme
86 operator_lexeme(lexeme_type lexeme
, std::string
const & string
);
87 bool operator<(operator_lexeme
const & other
) const;
90 bool parse_lexemes(std::string
const & input
, std::vector
<line_of_code
> & lines
, std::string
& error
);