Mercurial > projects > dil
annotate trunk/src/dil/ast/NodesEnum.d @ 668:a1f8d8f2db38
Renamed some identifiers.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Thu, 17 Jan 2008 19:27:46 +0100 |
parents | b5a828a9f9e3 |
children | d8c32113afde |
rev | line source |
---|---|
635 | 1 /++ |
2 Author: Aziz Köksal | |
3 License: GPL3 | |
4 +/ | |
5 module dil.ast.NodesEnum; | |
6 | |
640
05645f5613c1
Added an error message.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
635
diff
changeset
|
7 enum NodeCategory : ushort |
635 | 8 { |
9 Declaration, | |
10 Statement, | |
11 Expression, | |
12 Type, | |
13 Other | |
14 } | |
15 | |
16 /// Array of class names that inherit from Node. | |
17 static const char[][] classNames = [ | |
18 // Declarations: | |
19 "Declarations", | |
20 "EmptyDeclaration", | |
21 "IllegalDeclaration", | |
22 "ModuleDeclaration", | |
23 "ImportDeclaration", | |
24 "AliasDeclaration", | |
25 "TypedefDeclaration", | |
26 "EnumDeclaration", | |
656
436e3d270585
EnumMember inherits from Declaration now.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
655
diff
changeset
|
27 "EnumMember", |
635 | 28 "ClassDeclaration", |
29 "InterfaceDeclaration", | |
30 "StructDeclaration", | |
31 "UnionDeclaration", | |
32 "ConstructorDeclaration", | |
33 "StaticConstructorDeclaration", | |
34 "DestructorDeclaration", | |
35 "StaticDestructorDeclaration", | |
36 "FunctionDeclaration", | |
37 "VariableDeclaration", | |
38 "InvariantDeclaration", | |
39 "UnittestDeclaration", | |
40 "DebugDeclaration", | |
41 "VersionDeclaration", | |
42 "StaticIfDeclaration", | |
43 "StaticAssertDeclaration", | |
44 "TemplateDeclaration", | |
45 "NewDeclaration", | |
46 "DeleteDeclaration", | |
47 "ProtectionDeclaration", | |
48 "StorageClassDeclaration", | |
49 "LinkageDeclaration", | |
50 "AlignDeclaration", | |
51 "PragmaDeclaration", | |
52 "MixinDeclaration", | |
53 | |
54 // Statements: | |
55 "Statements", | |
56 "IllegalStatement", | |
57 "EmptyStatement", | |
658
a35e6debfb4c
FunctionBody inherits from Statement now.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
656
diff
changeset
|
58 "FunctionBody", |
635 | 59 "ScopeStatement", |
60 "LabeledStatement", | |
61 "ExpressionStatement", | |
62 "DeclarationStatement", | |
63 "IfStatement", | |
64 "WhileStatement", | |
65 "DoWhileStatement", | |
66 "ForStatement", | |
67 "ForeachStatement", | |
68 "ForeachRangeStatement", // D2.0 | |
69 "SwitchStatement", | |
70 "CaseStatement", | |
71 "DefaultStatement", | |
72 "ContinueStatement", | |
73 "BreakStatement", | |
74 "ReturnStatement", | |
75 "GotoStatement", | |
76 "WithStatement", | |
77 "SynchronizedStatement", | |
78 "TryStatement", | |
79 "CatchBody", | |
80 "FinallyBody", | |
81 "ScopeGuardStatement", | |
82 "ThrowStatement", | |
83 "VolatileStatement", | |
84 "AsmStatement", | |
85 "AsmInstruction", | |
86 "AsmAlignStatement", | |
87 "IllegalAsmInstruction", | |
88 "PragmaStatement", | |
89 "MixinStatement", | |
90 "StaticIfStatement", | |
91 "StaticAssertStatement", | |
92 "DebugStatement", | |
93 "VersionStatement", | |
94 | |
95 // Expressions: | |
659
304331ca2f95
Renamed EmptyExpression to IllegalExpression.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
658
diff
changeset
|
96 "IllegalExpression", |
635 | 97 "CondExpression", |
98 "CommaExpression", | |
99 "OrOrExpression", | |
100 "AndAndExpression", | |
101 "OrExpression", | |
102 "XorExpression", | |
103 "AndExpression", | |
104 "EqualExpression", | |
105 "IdentityExpression", | |
106 "RelExpression", | |
107 "InExpression", | |
108 "LShiftExpression", | |
109 "RShiftExpression", | |
110 "URShiftExpression", | |
111 "PlusExpression", | |
112 "MinusExpression", | |
113 "CatExpression", | |
114 "MulExpression", | |
115 "DivExpression", | |
116 "ModExpression", | |
117 "AssignExpression", | |
118 "LShiftAssignExpression", | |
119 "RShiftAssignExpression", | |
120 "URShiftAssignExpression", | |
121 "OrAssignExpression", | |
122 "AndAssignExpression", | |
123 "PlusAssignExpression", | |
124 "MinusAssignExpression", | |
125 "DivAssignExpression", | |
126 "MulAssignExpression", | |
127 "ModAssignExpression", | |
128 "XorAssignExpression", | |
129 "CatAssignExpression", | |
130 "AddressExpression", | |
131 "PreIncrExpression", | |
132 "PreDecrExpression", | |
133 "PostIncrExpression", | |
134 "PostDecrExpression", | |
135 "DerefExpression", | |
136 "SignExpression", | |
137 "NotExpression", | |
138 "CompExpression", | |
139 "CallExpression", | |
140 "NewExpression", | |
141 "NewAnonClassExpression", | |
142 "DeleteExpression", | |
143 "CastExpression", | |
144 "IndexExpression", | |
145 "SliceExpression", | |
146 "ModuleScopeExpression", | |
147 "IdentifierExpression", | |
148 "SpecialTokenExpression", | |
149 "DotExpression", | |
150 "TemplateInstanceExpression", | |
151 "ThisExpression", | |
152 "SuperExpression", | |
153 "NullExpression", | |
154 "DollarExpression", | |
155 "BoolExpression", | |
156 "IntExpression", | |
157 "RealExpression", | |
158 "ComplexExpression", | |
159 "CharExpression", | |
160 "StringExpression", | |
161 "ArrayLiteralExpression", | |
162 "AArrayLiteralExpression", | |
163 "AssertExpression", | |
164 "MixinExpression", | |
165 "ImportExpression", | |
166 "TypeofExpression", | |
167 "TypeDotIdExpression", | |
168 "TypeidExpression", | |
169 "IsExpression", | |
646
68953760d569
Added class ParenExpression.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
640
diff
changeset
|
170 "ParenExpression", |
635 | 171 "FunctionLiteralExpression", |
172 "TraitsExpression", // D2.0 | |
173 "VoidInitializer", | |
174 "ArrayInitializer", | |
175 "StructInitializer", | |
176 "AsmTypeExpression", | |
177 "AsmOffsetExpression", | |
178 "AsmSegExpression", | |
179 "AsmPostBracketExpression", | |
180 "AsmBracketExpression", | |
181 "AsmLocalSizeExpression", | |
182 "AsmRegisterExpression", | |
183 | |
184 // Types: | |
185 "UndefinedType", | |
186 "IntegralType", | |
187 "QualifiedType", | |
188 "ModuleScopeType", | |
189 "IdentifierType", | |
190 "TypeofType", | |
191 "TemplateInstanceType", | |
192 "PointerType", | |
193 "ArrayType", | |
194 "FunctionType", | |
195 "DelegateType", | |
196 "CFuncPointerType", | |
668
a1f8d8f2db38
Renamed some identifiers.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
664
diff
changeset
|
197 "BaseClassType", |
635 | 198 "ConstType", // D2.0 |
199 "InvariantType", // D2.0 | |
200 | |
201 // Other: | |
202 "Parameter", | |
203 "Parameters", | |
204 "TemplateAliasParameter", | |
205 "TemplateTypeParameter", | |
206 "TemplateThisParameter", // D2.0 | |
207 "TemplateValueParameter", | |
208 "TemplateTupleParameter", | |
209 "TemplateParameters", | |
210 "TemplateArguments", | |
211 ]; | |
212 | |
213 char[] generateNodeKindMembers() | |
214 { | |
215 char[] text; | |
216 foreach (className; classNames) | |
217 text ~= className ~ ","; | |
218 return text; | |
219 } | |
220 // pragma(msg, generateNodeKindMembers()); | |
221 | |
222 // enum NodeKind; | |
223 mixin( | |
640
05645f5613c1
Added an error message.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
635
diff
changeset
|
224 "enum NodeKind : ushort" |
635 | 225 "{" |
226 ~ generateNodeKindMembers ~ | |
227 "}" | |
228 ); |