Fix gtk_text_iter_forward_find_char binding, patch by Nicolas Joseph,
[vala-lang.git] / vala / valagenietokentype.vala
bloba2fd0ca46f65c76dd6a28a4fd810a8480fc1a746
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
20 * Author:
21 * Jamie McCracken jamiemcc gnome org
24 using GLib;
26 public enum Vala.Genie.TokenType {
27 NONE,
28 ABSTRACT,
29 ARRAY,
30 AS,
31 ASSERT,
32 ASSIGN,
33 ASSIGN_ADD,
34 ASSIGN_BITWISE_AND,
35 ASSIGN_BITWISE_OR,
36 ASSIGN_BITWISE_XOR,
37 ASSIGN_DIV,
38 ASSIGN_MUL,
39 ASSIGN_PERCENT,
40 ASSIGN_SHIFT_LEFT,
41 ASSIGN_SUB,
42 BITWISE_AND,
43 BITWISE_OR,
44 BREAK,
45 CARRET,
46 CASE,
47 CHARACTER_LITERAL,
48 CLASS,
49 CLOSE_BRACE,
50 CLOSE_BRACKET,
51 CLOSE_PARENS,
52 COLON,
53 COMMA,
54 CONST,
55 CONSTRUCT,
56 CONTINUE,
57 DEDENT,
58 DEF,
59 DEFAULT,
60 DELEGATE,
61 DELETE,
62 DICT,
63 DIV,
64 DO,
65 DOT,
66 DOWNTO,
67 DYNAMIC,
68 ELLIPSIS,
69 ELSE,
70 ENUM,
71 ENSURES,
72 ERRORDOMAIN,
73 EOF,
74 EOL,
75 EVENT,
76 EXCEPT,
77 EXTERN,
78 FALSE,
79 FINAL,
80 FINALLY,
81 FOR,
82 FOREACH,
83 GET,
84 HASH,
85 IDENTIFIER,
86 IF,
87 IMPLEMENTS,
88 IN,
89 INDENT,
90 INIT,
91 INLINE,
92 INTEGER_LITERAL,
93 INTERFACE,
94 INTERR,
95 IS,
96 ISA,
97 LAMBDA,
98 LIST,
99 LOCK,
100 MINUS,
101 NAMESPACE,
102 NEW,
103 NULL,
105 OUT,
106 OP_AND,
107 OP_DEC,
108 OP_EQ,
109 OP_GE,
110 OP_GT,
111 OP_INC,
112 OP_LE,
113 OP_LT,
114 OP_NE,
115 OP_NEG,
116 OP_OR,
117 OP_PTR,
118 OP_SHIFT_LEFT,
119 OPEN_BRACE,
120 OPEN_BRACKET,
121 OPEN_PARENS,
122 OVERRIDE,
123 PASS,
124 PERCENT,
125 PLUS,
126 PRINT,
127 PRIVATE,
128 PROP,
129 PROTECTED,
130 PUBLIC,
131 RAISE,
132 RAISES,
133 REAL_LITERAL,
134 READONLY,
135 REF,
136 REQUIRES,
137 RETURN,
138 SEMICOLON,
139 SET,
140 SIZEOF,
141 STAR,
142 STATIC,
143 STRING_LITERAL,
144 STRUCT,
145 SUPER,
146 THIS,
147 TILDE,
149 TRUE,
150 TRY,
151 TYPEOF,
152 USES,
153 VAR,
154 VIRTUAL,
155 VOID,
156 VOLATILE,
157 WEAK,
158 WHEN,
159 WHILE,
160 WRITEONLY;
162 public weak string to_string () {
163 switch (this) {
164 case ABSTRACT: return "`abstract'";
165 case ARRAY: return "`array'";
166 case AS: return "`as'";
167 case ASSERT: return "`assert'";
168 case ASSIGN: return "`='";
169 case ASSIGN_ADD: return "`+='";
170 case ASSIGN_BITWISE_AND: return "`&='";
171 case ASSIGN_BITWISE_OR: return "`|='";
172 case ASSIGN_BITWISE_XOR: return "`^='";
173 case ASSIGN_DIV: return "`/='";
174 case ASSIGN_MUL: return "`*='";
175 case ASSIGN_PERCENT: return "`%='";
176 case ASSIGN_SHIFT_LEFT: return "`<<='";
177 case ASSIGN_SUB: return "`-='";
178 case BITWISE_AND: return "`&'";
179 case BITWISE_OR: return "`|'";
180 case BREAK: return "`break'";
181 case CARRET: return "`^'";
182 case CASE: return "`case'";
183 case CHARACTER_LITERAL: return "character literal";
184 case CLASS: return "`class'";
185 case CLOSE_BRACE: return "`}'";
186 case CLOSE_BRACKET: return "`]'";
187 case CLOSE_PARENS: return "`)'";
188 case COLON: return "`:'";
189 case COMMA: return "`,'";
190 case CONST: return "`const'";
191 case CONSTRUCT: return "`construct'";
192 case CONTINUE: return "`continue'";
193 case DEDENT: return "`dedent'";
194 case DEF: return "`def'";
195 case DEFAULT: return "`default'";
196 case DELEGATE: return "`delegate'";
197 case DELETE: return "`delete'";
198 case DICT: return "`dict'";
199 case DIV: return "`/'";
200 case DO: return "`do'";
201 case DOT: return "`.'";
202 case DOWNTO: return "`downto'";
203 case DYNAMIC: return "`dynamic'";
204 case ELLIPSIS: return "`...'";
205 case ELSE: return "`else'";
206 case ENUM: return "`enum'";
207 case ENSURES: return "`ensures'";
208 case ERRORDOMAIN: return "`errordomain'";
209 case EOF: return "end of file";
210 case EOL: return "end of line";
211 case EVENT: return "event";
212 case EXCEPT: return "`except'";
213 case EXTERN: return "`extern'";
214 case FALSE: return "`false'";
215 case FINAL: return "`final'";
216 case FINALLY: return "`finally'";
217 case FOR: return "`for'";
218 case FOREACH: return "`foreach'";
219 case GET: return "`get'";
220 case HASH: return "`hash'";
221 case IDENTIFIER: return "identifier";
222 case IF: return "`if'";
223 case IMPLEMENTS: return "`implements'";
224 case IN: return "`in'";
225 case INDENT: return "`tab indent'";
226 case INIT: return "`init'";
227 case INLINE: return "`inline'";
228 case INTEGER_LITERAL: return "integer literal";
229 case INTERFACE: return "`interface'";
230 case INTERR: return "`?'";
231 case IS: return "`is'";
232 case ISA: return "`isa'";
233 case LAMBDA: return "`=>'";
234 case LIST: return "`list'";
235 case LOCK: return "`lock'";
236 case MINUS: return "`-'";
237 case NAMESPACE: return "`namespace'";
238 case NEW: return "`new'";
239 case NULL: return "`null'";
240 case OF: return "`of'";
241 case OUT: return "`out'";
242 case OP_AND: return "`&&'";
243 case OP_DEC: return "`--'";
244 case OP_EQ: return "`=='";
245 case OP_GE: return "`>='";
246 case OP_GT: return "`>'";
247 case OP_INC: return "`++'";
248 case OP_LE: return "`<='";
249 case OP_LT: return "`<'";
250 case OP_NE: return "`!='";
251 case OP_NEG: return "`!'";
252 case OP_OR: return "`||'";
253 case OP_PTR: return "`->'";
254 case OP_SHIFT_LEFT: return "`<<'";
255 case OPEN_BRACE: return "`{'";
256 case OPEN_BRACKET: return "`['";
257 case OPEN_PARENS: return "`('";
258 case OVERRIDE: return "`override'";
259 case PASS: return "`pass'";
260 case PERCENT: return "`%'";
261 case PLUS: return "`+'";
262 case PRINT: return "`print'";
263 case PRIVATE: return "`private'";
264 case PROP: return "`prop'";
265 case PROTECTED: return "`protected'";
266 case PUBLIC: return "`public'";
267 case RAISE: return "`raise'";
268 case RAISES: return "`raises'";
269 case READONLY: return "`readonly'";
270 case REAL_LITERAL: return "real literal";
271 case REF: return "`ref'";
272 case REQUIRES: return "`requires'";
273 case RETURN: return "`return'";
274 case SEMICOLON: return "`;'";
275 case SET: return "`set'";
276 case SIZEOF: return "`sizeof'";
277 case STAR: return "`*'";
278 case STATIC: return "`static'";
279 case STRING_LITERAL: return "string literal";
280 case STRUCT: return "`struct'";
281 case SUPER: return "`super'";
282 case THIS: return "`self'";
283 case TILDE: return "`~'";
284 case TO: return "`to'";
285 case TRUE: return "`true'";
286 case TRY: return "`try'";
287 case TYPEOF: return "`typeof'";
288 case USES: return "`uses'";
289 case VAR: return "`var'";
290 case VIRTUAL: return "`virtual'";
291 case VOID: return "`void'";
292 case VOLATILE: return "`volatile'";
293 case WEAK: return "`weak'";
294 case WHEN: return "`when'";
295 case WHILE: return "`while'";
296 case WRITEONLY: return "`writeonly'";
297 default: return "unknown token";