1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
/* valatokentype.vala
*
* Copyright (C) 2008-2010 Jürg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Jürg Billeter <j@bitron.ch>
*/
using GLib;
public enum Vala.TokenType {
NONE,
ABSTRACT,
AS,
ASSIGN,
ASSIGN_ADD,
ASSIGN_BITWISE_AND,
ASSIGN_BITWISE_OR,
ASSIGN_BITWISE_XOR,
ASSIGN_DIV,
ASSIGN_MUL,
ASSIGN_PERCENT,
ASSIGN_SHIFT_LEFT,
ASSIGN_SUB,
ASYNC,
BASE,
BITWISE_AND,
BITWISE_OR,
BREAK,
CARRET,
CASE,
CATCH,
CHARACTER_LITERAL,
CLASS,
CLOSE_BRACE,
CLOSE_BRACKET,
CLOSE_PARENS,
CLOSE_REGEX_LITERAL,
CLOSE_TEMPLATE,
COLON,
COMMA,
CONST,
CONSTRUCT,
CONTINUE,
DEFAULT,
DELEGATE,
DELETE,
DIV,
DO,
DOUBLE_COLON,
DOT,
DYNAMIC,
ELLIPSIS,
ELSE,
ENUM,
ENSURES,
ERRORDOMAIN,
EOF,
EXTERN,
FALSE,
FINALLY,
FOR,
FOREACH,
GET,
HASH,
IDENTIFIER,
IF,
IN,
INLINE,
INTEGER_LITERAL,
INTERFACE,
INTERNAL,
INTERR,
IS,
LAMBDA,
LOCK,
MINUS,
NAMESPACE,
NEW,
NULL,
OUT,
OP_AND,
OP_COALESCING,
OP_DEC,
OP_EQ,
OP_GE,
OP_GT,
OP_INC,
OP_LE,
OP_LT,
OP_NE,
OP_NEG,
OP_OR,
OP_PTR,
OP_SHIFT_LEFT,
OPEN_BRACE,
OPEN_BRACKET,
OPEN_PARENS,
OPEN_REGEX_LITERAL,
OPEN_TEMPLATE,
OVERRIDE,
OWNED,
PARAMS,
PERCENT,
PLUS,
PRIVATE,
PROTECTED,
PUBLIC,
REAL_LITERAL,
REF,
REGEX_LITERAL,
REQUIRES,
RETURN,
SEALED,
SEMICOLON,
SET,
SIGNAL,
SIZEOF,
STAR,
STATIC,
STRING_LITERAL,
STRUCT,
SWITCH,
TEMPLATE_STRING_LITERAL,
THIS,
THROW,
THROWS,
TILDE,
TRUE,
TRY,
TYPEOF,
UNOWNED,
USING,
VAR,
VERBATIM_STRING_LITERAL,
VIRTUAL,
VOID,
VOLATILE,
WEAK,
WHILE,
YIELD;
public unowned string to_string () {
switch (this) {
case ABSTRACT: return "`abstract'";
case AS: return "`as'";
case ASSIGN: return "`='";
case ASSIGN_ADD: return "`+='";
case ASSIGN_BITWISE_AND: return "`&='";
case ASSIGN_BITWISE_OR: return "`|='";
case ASSIGN_BITWISE_XOR: return "`^='";
case ASSIGN_DIV: return "`/='";
case ASSIGN_MUL: return "`*='";
case ASSIGN_PERCENT: return "`%='";
case ASSIGN_SHIFT_LEFT: return "`<<='";
case ASSIGN_SUB: return "`-='";
case ASYNC: return "`async'";
case BASE: return "`base'";
case BITWISE_AND: return "`&'";
case BITWISE_OR: return "`|'";
case BREAK: return "`break'";
case CARRET: return "`^'";
case CASE: return "`case'";
case CATCH: return "`catch'";
case CHARACTER_LITERAL: return "character literal";
case CLASS: return "`class'";
case CLOSE_BRACE: return "`}'";
case CLOSE_BRACKET: return "`]'";
case CLOSE_PARENS: return "`)'";
case CLOSE_REGEX_LITERAL: return "`/'";
case COLON: return "`:'";
case COMMA: return "`,'";
case CONST: return "`const'";
case CONSTRUCT: return "`construct'";
case CONTINUE: return "`continue'";
case DEFAULT: return "`default'";
case DELEGATE: return "`delegate'";
case DELETE: return "`delete'";
case DIV: return "`/'";
case DO: return "`do'";
case DOT: return "`.'";
case ELLIPSIS: return "`...'";
case ELSE: return "`else'";
case ENUM: return "`enum'";
case ENSURES: return "`ensures'";
case ERRORDOMAIN: return "`errordomain'";
case EOF: return "end of file";
case FALSE: return "`false'";
case FINALLY: return "`finally'";
case FOR: return "`for'";
case FOREACH: return "`foreach'";
case GET: return "`get'";
case HASH: return "`hash'";
case IDENTIFIER: return "identifier";
case IF: return "`if'";
case IN: return "`in'";
case INLINE: return "`inline'";
case INTEGER_LITERAL: return "integer literal";
case INTERFACE: return "`interface'";
case INTERNAL: return "`internal'";
case INTERR: return "`?'";
case IS: return "`is'";
case LAMBDA: return "`=>'";
case LOCK: return "`lock'";
case MINUS: return "`-'";
case NAMESPACE: return "`namespace'";
case NEW: return "`new'";
case NULL: return "`null'";
case OUT: return "`out'";
case OP_AND: return "`&&'";
case OP_DEC: return "`--'";
case OP_EQ: return "`=='";
case OP_GE: return "`>='";
case OP_GT: return "`>'";
case OP_INC: return "`++'";
case OP_LE: return "`<='";
case OP_LT: return "`<'";
case OP_NE: return "`!='";
case OP_NEG: return "`!'";
case OP_OR: return "`||'";
case OP_PTR: return "`->'";
case OP_SHIFT_LEFT: return "`<<'";
case OPEN_BRACE: return "`{'";
case OPEN_BRACKET: return "`['";
case OPEN_PARENS: return "`('";
case OPEN_REGEX_LITERAL: return "`/'";
case OVERRIDE: return "`override'";
case OWNED: return "`owned'";
case PARAMS: return "`params'";
case PERCENT: return "`%'";
case PLUS: return "`+'";
case PRIVATE: return "`private'";
case PROTECTED: return "`protected'";
case PUBLIC: return "`public'";
case REAL_LITERAL: return "real literal";
case REF: return "`ref'";
case REGEX_LITERAL: return "regex literal";
case REQUIRES: return "`requires'";
case RETURN: return "`return'";
case SEALED: return "`sealed'";
case SEMICOLON: return "`;'";
case SET: return "`set'";
case SIGNAL: return "`signal'";
case SIZEOF: return "`sizeof'";
case STAR: return "`*'";
case STATIC: return "`static'";
case STRING_LITERAL: return "string literal";
case STRUCT: return "`struct'";
case SWITCH: return "`switch'";
case THIS: return "`this'";
case THROW: return "`throw'";
case THROWS: return "`throws'";
case TILDE: return "`~'";
case TRUE: return "`true'";
case TRY: return "`try'";
case TYPEOF: return "`typeof'";
case UNOWNED: return "`unowned'";
case USING: return "`using'";
case VAR: return "`var'";
case VIRTUAL: return "`virtual'";
case VOID: return "`void'";
case VOLATILE: return "`volatile'";
case WEAK: return "`weak'";
case WHILE: return "`while'";
case YIELD: return "`yield'";
default: return "unknown token";
}
}
}
|