40 class Variable; |
40 class Variable; |
41 |
41 |
42 // ============================================================================ |
42 // ============================================================================ |
43 // Mark types |
43 // Mark types |
44 // |
44 // |
45 named_enum MarkType |
45 named_enum MarkType : char |
46 { |
46 { |
47 MARK_Label, |
47 MARK_Label, |
48 MARK_If, |
48 MARK_If, |
49 MARK_Internal, // internal structures |
49 MARK_Internal, // internal structures |
50 }; |
50 }; |
51 |
51 |
52 // ============================================================================ |
52 // ============================================================================ |
53 // Scope types |
53 // Scope types |
54 // |
54 // |
55 named_enum ScopeType |
55 named_enum ScopeType : char |
56 { |
56 { |
57 SCOPE_Unknown, |
57 SCOPE_Unknown, |
58 SCOPE_If, |
58 SCOPE_If, |
59 SCOPE_While, |
59 SCOPE_While, |
60 SCOPE_For, |
60 SCOPE_For, |
61 SCOPE_Do, |
61 SCOPE_Do, |
62 SCOPE_Switch, |
62 SCOPE_Switch, |
63 SCOPE_Else, |
63 SCOPE_Else, |
64 }; |
64 }; |
65 |
65 |
66 named_enum AssignmentOperator |
66 named_enum AssignmentOperator : char |
67 { |
67 { |
68 ASSIGNOP_Assign, |
68 ASSIGNOP_Assign, |
69 ASSIGNOP_Add, |
69 ASSIGNOP_Add, |
70 ASSIGNOP_Subtract, |
70 ASSIGNOP_Subtract, |
71 ASSIGNOP_Multiply, |
71 ASSIGNOP_Multiply, |
73 ASSIGNOP_Modulus, |
73 ASSIGNOP_Modulus, |
74 ASSIGNOP_Increase, |
74 ASSIGNOP_Increase, |
75 ASSIGNOP_Decrease, |
75 ASSIGNOP_Decrease, |
76 }; |
76 }; |
77 |
77 |
78 named_enum Writability |
78 named_enum Writability : char |
79 { |
79 { |
80 WRITE_Mutable, // normal read-many-write-many variable |
80 WRITE_Mutable, // normal read-many-write-many variable |
81 WRITE_Const, // write-once const variable |
81 WRITE_Const, // write-once const variable |
82 WRITE_Constexpr, // const variable whose value is known to compiler |
82 WRITE_Constexpr, // const variable whose value is known to compiler |
83 }; |
83 }; |
84 |
84 |
85 // ============================================================================= |
85 // ============================================================================= |
86 // |
86 // |
87 // Parser mode: where is the parser at? |
87 // Parser mode: where is the parser at? |
88 // |
88 // |
89 named_enum ParserMode |
89 named_enum class ParserMode |
90 { |
90 { |
91 PARSERMODE_TopLevel, // at top level |
91 TopLevel, // at top level |
92 PARSERMODE_Event, // inside event definition |
92 Event, // inside event definition |
93 PARSERMODE_MainLoop, // inside mainloop |
93 MainLoop, // inside mainloop |
94 PARSERMODE_Onenter, // inside onenter |
94 Onenter, // inside onenter |
95 PARSERMODE_Onexit, // inside onexit |
95 Onexit, // inside onexit |
96 }; |
96 }; |
97 |
97 |
98 // ============================================================================ |
98 // ============================================================================ |
99 // |
99 // |
100 struct Variable |
100 struct Variable |