1 /* valagenietokentype.vala
3 * Copyright (C) 2008 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
{
154 TEMPLATE_STRING_LITERAL
,
164 VERBATIM_STRING_LITERAL
,
174 public unowned
string to_string () {
176 case ABSTRACT
: return "`abstract'";
177 case ARRAY
: return "`array'";
178 case AS
: return "`as'";
179 case ASSERT
: return "`assert'";
180 case ASSIGN
: return "`='";
181 case ASSIGN_ADD
: return "`+='";
182 case ASSIGN_BITWISE_AND
: return "`&='";
183 case ASSIGN_BITWISE_OR
: return "`|='";
184 case ASSIGN_BITWISE_XOR
: return "`^='";
185 case ASSIGN_DIV
: return "`/='";
186 case ASSIGN_MUL
: return "`*='";
187 case ASSIGN_PERCENT
: return "`%='";
188 case ASSIGN_SHIFT_LEFT
: return "`<<='";
189 case ASSIGN_SUB
: return "`-='";
190 case ASYNC
: return "`async'";
191 case BITWISE_AND
: return "`&'";
192 case BITWISE_OR
: return "`|'";
193 case BREAK
: return "`break'";
194 case CARRET
: return "`^'";
195 case CASE
: return "`case'";
196 case CHARACTER_LITERAL
: return "character literal";
197 case CLASS
: return "`class'";
198 case CLOSE_BRACE
: return "`}'";
199 case CLOSE_BRACKET
: return "`]'";
200 case CLOSE_PARENS
: return "`)'";
201 case CLOSE_REGEX_LITERAL
: return "`/'";
202 case COLON
: return "`:'";
203 case COMMA
: return "`,'";
204 case CONST
: return "`const'";
205 case CONSTRUCT
: return "`construct'";
206 case CONTINUE
: return "`continue'";
207 case DEDENT
: return "`dedent'";
208 case DEF
: return "`def'";
209 case DEFAULT
: return "`default'";
210 case DELEGATE
: return "`delegate'";
211 case DELETE
: return "`delete'";
212 case DICT
: return "`dict'";
213 case DIV
: return "`/'";
214 case DO
: return "`do'";
215 case DOT
: return "`.'";
216 case DOWNTO
: return "`downto'";
217 case DYNAMIC
: return "`dynamic'";
218 case ELLIPSIS
: return "`...'";
219 case ELSE
: return "`else'";
220 case ENUM
: return "`enum'";
221 case ENSURES
: return "`ensures'";
222 case ERRORDOMAIN
: return "`errordomain'";
223 case EOF
: return "end of file";
224 case EOL
: return "end of line";
225 case EVENT
: return "event";
226 case EXCEPT
: return "`except'";
227 case EXTERN
: return "`extern'";
228 case FALSE
: return "`false'";
229 case FINAL
: return "`final'";
230 case FINALLY
: return "`finally'";
231 case FOR
: return "`for'";
232 case GET
: return "`get'";
233 case HASH
: return "`hash'";
234 case IDENTIFIER
: return "identifier";
235 case IF
: return "`if'";
236 case IMPLEMENTS
: return "`implements'";
237 case IN
: return "`in'";
238 case INDENT
: return "`tab indent'";
239 case INIT
: return "`init'";
240 case INLINE
: return "`inline'";
241 case INTEGER_LITERAL
: return "integer literal";
242 case INTERFACE
: return "`interface'";
243 case INTERNAL
: return "`internal'";
244 case INTERR
: return "`?'";
245 case IS
: return "`is'";
246 case ISA
: return "`isa'";
247 case LAMBDA
: return "`=>'";
248 case LIST
: return "`list'";
249 case LOCK
: return "`lock'";
250 case MINUS
: return "`-'";
251 case NAMESPACE
: return "`namespace'";
252 case NEW
: return "`new'";
253 case NULL
: return "`null'";
254 case OF
: return "`of'";
255 case OUT
: return "`out'";
256 case OP_AND
: return "`&&'";
257 case OP_DEC
: return "`--'";
258 case OP_EQ
: return "`=='";
259 case OP_GE
: return "`>='";
260 case OP_GT
: return "`>'";
261 case OP_INC
: return "`++'";
262 case OP_LE
: return "`<='";
263 case OP_LT
: return "`<'";
264 case OP_NE
: return "`!='";
265 case OP_NEG
: return "`!'";
266 case OP_OR
: return "`||'";
267 case OP_PTR
: return "`->'";
268 case OP_SHIFT_LEFT
: return "`<<'";
269 case OPEN_BRACE
: return "`{'";
270 case OPEN_BRACKET
: return "`['";
271 case OPEN_PARENS
: return "`('";
272 case OPEN_REGEX_LITERAL
: return "`/'";
273 case OVERRIDE
: return "`override'";
274 case OWNED
: return "`owned'";
275 case PARAMS
: return "`params'";
276 case PASS
: return "`pass'";
277 case PERCENT
: return "`%'";
278 case PLUS
: return "`+'";
279 case PRINT
: return "`print'";
280 case PRIVATE
: return "`private'";
281 case PROP
: return "`prop'";
282 case PROTECTED
: return "`protected'";
283 case PUBLIC
: return "`public'";
284 case RAISE
: return "`raise'";
285 case RAISES
: return "`raises'";
286 case READONLY
: return "`readonly'";
287 case REAL_LITERAL
: return "real literal";
288 case REF
: return "`ref'";
289 case REGEX_LITERAL
: return "regex literal";
290 case REQUIRES
: return "`requires'";
291 case RETURN
: return "`return'";
292 case SEMICOLON
: return "`;'";
293 case SET
: return "`set'";
294 case SIZEOF
: return "`sizeof'";
295 case STAR
: return "`*'";
296 case STATIC
: return "`static'";
297 case STRING_LITERAL
: return "string literal";
298 case STRUCT
: return "`struct'";
299 case SUPER
: return "`super'";
300 case THIS
: return "`self'";
301 case TILDE
: return "`~'";
302 case TO
: return "`to'";
303 case TRUE
: return "`true'";
304 case TRY
: return "`try'";
305 case TYPEOF
: return "`typeof'";
306 case UNOWNED
: return "`unowned'";
307 case USES
: return "`uses'";
308 case VAR
: return "`var'";
309 case VIRTUAL
: return "`virtual'";
310 case VOID
: return "`void'";
311 case VOLATILE
: return "`volatile'";
312 case WEAK
: return "`weak'";
313 case WHEN
: return "`when'";
314 case WHILE
: return "`while'";
315 case WRITEONLY
: return "`writeonly'";
316 case YIELD
: return "`yield'";
317 default: return "unknown token";