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