Mercurial > projects > ddmd
annotate dmd/TOK.d @ 135:af1bebfd96a4 dmd2037
dmd 2.038
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Mon, 13 Sep 2010 22:19:42 +0100 |
parents | 60bb0fe4563e |
children |
rev | line source |
---|---|
0 | 1 module dmd.TOK; |
2 | |
3 version (DMDV2) { | |
4 enum TOK | |
5 { | |
6 TOKreserved, | |
7 | |
8 // Other | |
9 TOKlparen, TOKrparen, | |
10 TOKlbracket, TOKrbracket, | |
11 TOKlcurly, TOKrcurly, | |
12 TOKcolon, TOKneg, | |
13 TOKsemicolon, TOKdotdotdot, | |
14 TOKeof, TOKcast, | |
15 TOKnull, TOKassert, | |
16 TOKtrue, TOKfalse, | |
17 TOKarray, TOKcall, | |
18 TOKaddress, | |
19 TOKtype, TOKthrow, | |
20 TOKnew, TOKdelete, | |
21 TOKstar, TOKsymoff, | |
22 TOKvar, TOKdotvar, | |
23 TOKdotti, TOKdotexp, | |
24 TOKdottype, TOKslice, | |
25 TOKarraylength, TOKversion, | |
26 TOKmodule, TOKdollar, | |
27 TOKtemplate, TOKdottd, | |
28 TOKdeclaration, TOKtypeof, | |
29 TOKpragma, TOKdsymbol, | |
30 TOKtypeid, TOKuadd, | |
31 TOKremove, | |
32 TOKnewanonclass, TOKcomment, | |
33 TOKarrayliteral, TOKassocarrayliteral, | |
34 TOKstructliteral, | |
35 | |
36 // Operators | |
37 TOKlt, TOKgt, | |
38 TOKle, TOKge, | |
39 TOKequal, TOKnotequal, | |
40 TOKidentity, TOKnotidentity, | |
41 TOKindex, TOKis, | |
42 TOKtobool, | |
43 | |
44 // 60 | |
45 // NCEG floating point compares | |
46 // !<>= <> <>= !> !>= !< !<= !<> | |
47 TOKunord,TOKlg,TOKleg,TOKule,TOKul,TOKuge,TOKug,TOKue, | |
48 | |
49 TOKshl, TOKshr, | |
50 TOKshlass, TOKshrass, | |
51 TOKushr, TOKushrass, | |
52 TOKcat, TOKcatass, // ~ ~= | |
53 TOKadd, TOKmin, TOKaddass, TOKminass, | |
54 TOKmul, TOKdiv, TOKmod, | |
55 TOKmulass, TOKdivass, TOKmodass, | |
56 TOKand, TOKor, TOKxor, | |
57 TOKandass, TOKorass, TOKxorass, | |
58 TOKassign, TOKnot, TOKtilde, | |
59 TOKplusplus, TOKminusminus, TOKconstruct, TOKblit, | |
60 TOKdot, TOKarrow, TOKcomma, | |
61 TOKquestion, TOKandand, TOKoror, | |
62 | |
63 // 104 | |
64 // Numeric literals | |
65 TOKint32v, TOKuns32v, | |
66 TOKint64v, TOKuns64v, | |
67 TOKfloat32v, TOKfloat64v, TOKfloat80v, | |
68 TOKimaginary32v, TOKimaginary64v, TOKimaginary80v, | |
69 | |
70 // Char constants | |
71 TOKcharv, TOKwcharv, TOKdcharv, | |
72 | |
73 // Leaf operators | |
74 TOKidentifier, TOKstring, | |
75 TOKthis, TOKsuper, | |
76 TOKhalt, TOKtuple, | |
73 | 77 TOKerror, |
0 | 78 |
79 // Basic types | |
80 TOKvoid, | |
81 TOKint8, TOKuns8, | |
82 TOKint16, TOKuns16, | |
83 TOKint32, TOKuns32, | |
84 TOKint64, TOKuns64, | |
85 TOKfloat32, TOKfloat64, TOKfloat80, | |
86 TOKimaginary32, TOKimaginary64, TOKimaginary80, | |
87 TOKcomplex32, TOKcomplex64, TOKcomplex80, | |
88 TOKchar, TOKwchar, TOKdchar, TOKbit, TOKbool, | |
89 TOKcent, TOKucent, | |
90 | |
91 // Aggregates | |
92 TOKstruct, TOKclass, TOKinterface, TOKunion, TOKenum, TOKimport, | |
93 TOKtypedef, TOKalias, TOKoverride, TOKdelegate, TOKfunction, | |
94 TOKmixin, | |
95 | |
96 TOKalign, TOKextern, TOKprivate, TOKprotected, TOKpublic, TOKexport, | |
97 TOKstatic, /*TOKvirtual,*/ TOKfinal, TOKconst, TOKabstract, TOKvolatile, | |
98 TOKdebug, TOKdeprecated, TOKin, TOKout, TOKinout, TOKlazy, | |
99 TOKauto, TOKpackage, TOKmanifest, TOKimmutable, | |
100 | |
101 // Statements | |
102 TOKif, TOKelse, TOKwhile, TOKfor, TOKdo, TOKswitch, | |
103 TOKcase, TOKdefault, TOKbreak, TOKcontinue, TOKwith, | |
104 TOKsynchronized, TOKreturn, TOKgoto, TOKtry, TOKcatch, TOKfinally, | |
105 TOKasm, TOKforeach, TOKforeach_reverse, | |
106 TOKscope, | |
107 TOKon_scope_exit, TOKon_scope_failure, TOKon_scope_success, | |
108 | |
109 // Contracts | |
110 TOKbody, TOKinvariant, | |
111 | |
112 // Testing | |
113 TOKunittest, | |
114 | |
115 // Added after 1.0 | |
116 TOKref, | |
117 TOKmacro, | |
118 | |
119 TOKtraits, | |
120 TOKoverloadset, | |
121 TOKpure, | |
122 TOKnothrow, | |
123 TOKtls, | |
124 TOKgshared, | |
125 TOKline, | |
126 TOKfile, | |
127 TOKshared, | |
128 TOKat, | |
130
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
73
diff
changeset
|
129 TOKpow, |
135 | 130 TOKpowass, |
0 | 131 |
132 TOKMAX | |
133 } | |
134 } else { | |
135 enum TOK | |
136 { | |
137 TOKreserved, | |
138 | |
139 // Other | |
140 TOKlparen, TOKrparen, | |
141 TOKlbracket, TOKrbracket, | |
142 TOKlcurly, TOKrcurly, | |
143 TOKcolon, TOKneg, | |
144 TOKsemicolon, TOKdotdotdot, | |
145 TOKeof, TOKcast, | |
146 TOKnull, TOKassert, | |
147 TOKtrue, TOKfalse, | |
148 TOKarray, TOKcall, | |
149 TOKaddress, | |
150 TOKtype, TOKthrow, | |
151 TOKnew, TOKdelete, | |
152 TOKstar, TOKsymoff, | |
153 TOKvar, TOKdotvar, | |
154 TOKdotti, TOKdotexp, | |
155 TOKdottype, TOKslice, | |
156 TOKarraylength, TOKversion, | |
157 TOKmodule, TOKdollar, | |
158 TOKtemplate, TOKdottd, | |
159 TOKdeclaration, TOKtypeof, | |
160 TOKpragma, TOKdsymbol, | |
161 TOKtypeid, TOKuadd, | |
162 TOKremove, | |
163 TOKnewanonclass, TOKcomment, | |
164 TOKarrayliteral, TOKassocarrayliteral, | |
165 TOKstructliteral, | |
166 | |
167 // Operators | |
168 TOKlt, TOKgt, | |
169 TOKle, TOKge, | |
170 TOKequal, TOKnotequal, | |
171 TOKidentity, TOKnotidentity, | |
172 TOKindex, TOKis, | |
173 TOKtobool, | |
174 | |
175 // 60 | |
176 // NCEG floating point compares | |
177 // !<>= <> <>= !> !>= !< !<= !<> | |
178 TOKunord,TOKlg,TOKleg,TOKule,TOKul,TOKuge,TOKug,TOKue, | |
179 | |
180 TOKshl, TOKshr, | |
181 TOKshlass, TOKshrass, | |
182 TOKushr, TOKushrass, | |
183 TOKcat, TOKcatass, // ~ ~= | |
184 TOKadd, TOKmin, TOKaddass, TOKminass, | |
185 TOKmul, TOKdiv, TOKmod, | |
186 TOKmulass, TOKdivass, TOKmodass, | |
187 TOKand, TOKor, TOKxor, | |
188 TOKandass, TOKorass, TOKxorass, | |
189 TOKassign, TOKnot, TOKtilde, | |
190 TOKplusplus, TOKminusminus, TOKconstruct, TOKblit, | |
191 TOKdot, TOKarrow, TOKcomma, | |
192 TOKquestion, TOKandand, TOKoror, | |
193 | |
194 // 104 | |
195 // Numeric literals | |
196 TOKint32v, TOKuns32v, | |
197 TOKint64v, TOKuns64v, | |
198 TOKfloat32v, TOKfloat64v, TOKfloat80v, | |
199 TOKimaginary32v, TOKimaginary64v, TOKimaginary80v, | |
200 | |
201 // Char constants | |
202 TOKcharv, TOKwcharv, TOKdcharv, | |
203 | |
204 // Leaf operators | |
205 TOKidentifier, TOKstring, | |
206 TOKthis, TOKsuper, | |
207 TOKhalt, TOKtuple, | |
73 | 208 TOKerror, |
0 | 209 |
210 // Basic types | |
211 TOKvoid, | |
212 TOKint8, TOKuns8, | |
213 TOKint16, TOKuns16, | |
214 TOKint32, TOKuns32, | |
215 TOKint64, TOKuns64, | |
216 TOKfloat32, TOKfloat64, TOKfloat80, | |
217 TOKimaginary32, TOKimaginary64, TOKimaginary80, | |
218 TOKcomplex32, TOKcomplex64, TOKcomplex80, | |
219 TOKchar, TOKwchar, TOKdchar, TOKbit, TOKbool, | |
220 TOKcent, TOKucent, | |
221 | |
222 // Aggregates | |
223 TOKstruct, TOKclass, TOKinterface, TOKunion, TOKenum, TOKimport, | |
224 TOKtypedef, TOKalias, TOKoverride, TOKdelegate, TOKfunction, | |
225 TOKmixin, | |
226 | |
227 TOKalign, TOKextern, TOKprivate, TOKprotected, TOKpublic, TOKexport, | |
228 TOKstatic, /*TOKvirtual,*/ TOKfinal, TOKconst, TOKabstract, TOKvolatile, | |
229 TOKdebug, TOKdeprecated, TOKin, TOKout, TOKinout, TOKlazy, | |
230 TOKauto, TOKpackage, TOKmanifest, TOKimmutable, | |
231 | |
232 // Statements | |
233 TOKif, TOKelse, TOKwhile, TOKfor, TOKdo, TOKswitch, | |
234 TOKcase, TOKdefault, TOKbreak, TOKcontinue, TOKwith, | |
235 TOKsynchronized, TOKreturn, TOKgoto, TOKtry, TOKcatch, TOKfinally, | |
236 TOKasm, TOKforeach, TOKforeach_reverse, | |
237 TOKscope, | |
238 TOKon_scope_exit, TOKon_scope_failure, TOKon_scope_success, | |
239 | |
240 // Contracts | |
241 TOKbody, TOKinvariant, | |
242 | |
243 // Testing | |
244 TOKunittest, | |
245 | |
246 // Added after 1.0 | |
247 TOKref, | |
248 TOKmacro, | |
249 | |
250 TOKMAX | |
251 } | |
252 } | |
253 | |
135 | 254 alias TOK.TOKinout TOKwild; |
255 | |
0 | 256 import dmd.EnumUtils; |
257 mixin(BringToCurrentScope!(TOK)); |