Added the assignment operators to the lexeme group function
[fridhskrift.git] / lexer / group.cpp
blob63ba5ad3a793d59aaafd17cdc3bdc1e827afdc2c
1 #include <fridh/lexer.hpp>
3 namespace fridh
5 bool get_lexeme_group(lexeme_type::type input, lexeme_group::type & output)
7 using namespace lexeme_type;
9 switch(input)
11 case name:
13 case boolean:
14 case signed_integer:
15 case unsigned_integer:
16 case floating_point_value:
17 case string:
18 output = lexeme_group::argument;
19 return true;
21 case addition:
22 case subtraction:
23 case multiplication:
24 case division:
25 case modulo:
26 case exponentiation:
28 case assignment:
29 case addition_assignment:
30 case subtraction_assignment:
31 case multiplication_assignment:
32 case division_assignment:
33 case modulo_assignment:
34 case exponentiation_assignment:
36 case less_than:
37 case less_than_or_equal:
38 case greater_than:
39 case greater_than_or_equal:
40 case not_equal:
41 case equal:
43 case logical_and:
44 case logical_or:
46 case shift_left:
47 case shift_right:
49 case binary_and:
50 case binary_or:
51 case binary_xor:
53 output = lexeme_group::binary_operator;
54 return true;
56 case logical_not:
58 case binary_not:
60 case increment:
61 case decrement:
63 output = lexeme_group::unary_operator;
64 return true;
66 default:
67 return false;