1 /* valagenietokentype.vala
3 * Copyright (C) 2008-2012 Jamie McCracken, Jürg Billeter
4 * Based on code by Jürg Billeter
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 * Jamie McCracken jamiemcc gnome org
26 public enum Vala
.Genie
.TokenType
{
155 TEMPLATE_STRING_LITERAL
,
165 VERBATIM_STRING_LITERAL
,
175 public unowned
string to_string () {
177 case ABSTRACT
: return "`abstract'";
178 case ARRAY
: return "`array'";
179 case AS
: return "`as'";
180 case ASSERT
: return "`assert'";
181 case ASSIGN
: return "`='";
182 case ASSIGN_ADD
: return "`+='";
183 case ASSIGN_BITWISE_AND
: return "`&='";
184 case ASSIGN_BITWISE_OR
: return "`|='";
185 case ASSIGN_BITWISE_XOR
: return "`^='";
186 case ASSIGN_DIV
: return "`/='";
187 case ASSIGN_MUL
: return "`*='";
188 case ASSIGN_PERCENT
: return "`%='";
189 case ASSIGN_SHIFT_LEFT
: return "`<<='";
190 case ASSIGN_SUB
: return "`-='";
191 case ASYNC
: return "`async'";
192 case BITWISE_AND
: return "`&'";
193 case BITWISE_OR
: return "`|'";
194 case BREAK
: return "`break'";
195 case CARRET
: return "`^'";
196 case CASE
: return "`case'";
197 case CHARACTER_LITERAL
: return "character literal";
198 case CLASS
: return "`class'";
199 case CLOSE_BRACE
: return "`}'";
200 case CLOSE_BRACKET
: return "`]'";
201 case CLOSE_PARENS
: return "`)'";
202 case CLOSE_REGEX_LITERAL
: return "`/'";
203 case CLOSE_TEMPLATE
: return "close template";
204 case COLON
: return "`:'";
205 case COMMA
: return "`,'";
206 case CONST
: return "`const'";
207 case CONSTRUCT
: return "`construct'";
208 case CONTINUE
: return "`continue'";
209 case DEDENT
: return "`dedent'";
210 case DEF
: return "`def'";
211 case DEFAULT
: return "`default'";
212 case DELEGATE
: return "`delegate'";
213 case DELETE
: return "`delete'";
214 case DICT
: return "`dict'";
215 case DIV
: return "`/'";
216 case DO
: return "`do'";
217 case DOT
: return "`.'";
218 case DOWNTO
: return "`downto'";
219 case DYNAMIC
: return "`dynamic'";
220 case ELLIPSIS
: return "`...'";
221 case ELSE
: return "`else'";
222 case ENUM
: return "`enum'";
223 case ENSURES
: return "`ensures'";
224 case ERRORDOMAIN
: return "`errordomain'";
225 case EOF
: return "end of file";
226 case EOL
: return "end of line";
227 case EVENT
: return "event";
228 case EXCEPT
: return "`except'";
229 case EXTERN
: return "`extern'";
230 case FALSE
: return "`false'";
231 case FINAL
: return "`final'";
232 case FINALLY
: return "`finally'";
233 case FOR
: return "`for'";
234 case GET
: return "`get'";
235 case HASH
: return "`hash'";
236 case IDENTIFIER
: return "identifier";
237 case IF
: return "`if'";
238 case IMPLEMENTS
: return "`implements'";
239 case IN
: return "`in'";
240 case INDENT
: return "`tab indent'";
241 case INIT
: return "`init'";
242 case INLINE
: return "`inline'";
243 case INTEGER_LITERAL
: return "integer literal";
244 case INTERFACE
: return "`interface'";
245 case INTERNAL
: return "`internal'";
246 case INTERR
: return "`?'";
247 case IS
: return "`is'";
248 case ISA
: return "`isa'";
249 case LAMBDA
: return "`=>'";
250 case LIST
: return "`list'";
251 case LOCK
: return "`lock'";
252 case MINUS
: return "`-'";
253 case NAMESPACE
: return "`namespace'";
254 case NEW
: return "`new'";
255 case NULL
: return "`null'";
256 case OF
: return "`of'";
257 case OUT
: return "`out'";
258 case OP_AND
: return "`and'";
259 case OP_DEC
: return "`--'";
260 case OP_EQ
: return "`=='";
261 case OP_GE
: return "`>='";
262 case OP_GT
: return "`>'";
263 case OP_INC
: return "`++'";
264 case OP_LE
: return "`<='";
265 case OP_LT
: return "`<'";
266 case OP_NE
: return "`!='";
267 case OP_NEG
: return "`!'";
268 case OP_OR
: return "`or'";
269 case OP_PTR
: return "`->'";
270 case OP_SHIFT_LEFT
: return "`<<'";
271 case OPEN_BRACE
: return "`{'";
272 case OPEN_BRACKET
: return "`['";
273 case OPEN_PARENS
: return "`('";
274 case OPEN_REGEX_LITERAL
: return "`/'";
275 case OPEN_TEMPLATE
: return "open template";
276 case OVERRIDE
: return "`override'";
277 case OWNED
: return "`owned'";
278 case PARAMS
: return "`params'";
279 case PASS
: return "`pass'";
280 case PERCENT
: return "`%'";
281 case PLUS
: return "`+'";
282 case PRINT
: return "`print'";
283 case PRIVATE
: return "`private'";
284 case PROP
: return "`prop'";
285 case PROTECTED
: return "`protected'";
286 case PUBLIC
: return "`public'";
287 case RAISE
: return "`raise'";
288 case RAISES
: return "`raises'";
289 case READONLY
: return "`readonly'";
290 case REAL_LITERAL
: return "real literal";
291 case REF
: return "`ref'";
292 case REGEX_LITERAL
: return "regex literal";
293 case REQUIRES
: return "`requires'";
294 case RETURN
: return "`return'";
295 case SEALED
: return "`sealed'";
296 case SEMICOLON
: return "`;'";
297 case SET
: return "`set'";
298 case SIZEOF
: return "`sizeof'";
299 case STAR
: return "`*'";
300 case STATIC
: return "`static'";
301 case STRING_LITERAL
: return "string literal";
302 case STRUCT
: return "`struct'";
303 case SUPER
: return "`super'";
304 case TEMPLATE_STRING_LITERAL
: return "template string literal";
305 case THIS
: return "`self'";
306 case TILDE
: return "`~'";
307 case TO
: return "`to'";
308 case TRUE
: return "`true'";
309 case TRY
: return "`try'";
310 case TYPEOF
: return "`typeof'";
311 case UNOWNED
: return "`unowned'";
312 case USES
: return "`uses'";
313 case VAR
: return "`var'";
314 case VERBATIM_STRING_LITERAL
: return "verbatim string literal";
315 case VIRTUAL
: return "`virtual'";
316 case VOID
: return "`void'";
317 case VOLATILE
: return "`volatile'";
318 case WEAK
: return "`weak'";
319 case WHEN
: return "`when'";
320 case WHILE
: return "`while'";
321 case WRITEONLY
: return "`writeonly'";
322 case YIELD
: return "`yield'";
323 default: return "unknown token";