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
20 * Jürg Billeter <j@bitron.ch>
25 public enum Vala
.TokenType
{
138 TEMPLATE_STRING_LITERAL
,
149 VERBATIM_STRING_LITERAL
,
157 public unowned
string to_string () {
159 case ABSTRACT
: return "`abstract'";
160 case AS
: return "`as'";
161 case ASSIGN
: return "`='";
162 case ASSIGN_ADD
: return "`+='";
163 case ASSIGN_BITWISE_AND
: return "`&='";
164 case ASSIGN_BITWISE_OR
: return "`|='";
165 case ASSIGN_BITWISE_XOR
: return "`^='";
166 case ASSIGN_DIV
: return "`/='";
167 case ASSIGN_MUL
: return "`*='";
168 case ASSIGN_PERCENT
: return "`%='";
169 case ASSIGN_SHIFT_LEFT
: return "`<<='";
170 case ASSIGN_SUB
: return "`-='";
171 case ASYNC
: return "`async'";
172 case BASE
: return "`base'";
173 case BITWISE_AND
: return "`&'";
174 case BITWISE_OR
: return "`|'";
175 case BREAK
: return "`break'";
176 case CARRET
: return "`^'";
177 case CASE
: return "`case'";
178 case CATCH
: return "`catch'";
179 case CHARACTER_LITERAL
: return "character literal";
180 case CLASS
: return "`class'";
181 case CLOSE_BRACE
: return "`}'";
182 case CLOSE_BRACKET
: return "`]'";
183 case CLOSE_PARENS
: return "`)'";
184 case CLOSE_REGEX_LITERAL
: return "`/'";
185 case COLON
: return "`:'";
186 case COMMA
: return "`,'";
187 case CONST
: return "`const'";
188 case CONSTRUCT
: return "`construct'";
189 case CONTINUE
: return "`continue'";
190 case DEFAULT
: return "`default'";
191 case DELEGATE
: return "`delegate'";
192 case DELETE
: return "`delete'";
193 case DIV
: return "`/'";
194 case DO
: return "`do'";
195 case DOT
: return "`.'";
196 case ELLIPSIS
: return "`...'";
197 case ELSE
: return "`else'";
198 case ENUM
: return "`enum'";
199 case ENSURES
: return "`ensures'";
200 case ERRORDOMAIN
: return "`errordomain'";
201 case EOF
: return "end of file";
202 case FALSE
: return "`false'";
203 case FINALLY
: return "`finally'";
204 case FOR
: return "`for'";
205 case FOREACH
: return "`foreach'";
206 case GET
: return "`get'";
207 case HASH
: return "`hash'";
208 case IDENTIFIER
: return "identifier";
209 case IF
: return "`if'";
210 case IN
: return "`in'";
211 case INLINE
: return "`inline'";
212 case INTEGER_LITERAL
: return "integer literal";
213 case INTERFACE
: return "`interface'";
214 case INTERNAL
: return "`internal'";
215 case INTERR
: return "`?'";
216 case IS
: return "`is'";
217 case LAMBDA
: return "`=>'";
218 case LOCK
: return "`lock'";
219 case MINUS
: return "`-'";
220 case NAMESPACE
: return "`namespace'";
221 case NEW
: return "`new'";
222 case NULL
: return "`null'";
223 case OUT
: return "`out'";
224 case OP_AND
: return "`&&'";
225 case OP_DEC
: return "`--'";
226 case OP_EQ
: return "`=='";
227 case OP_GE
: return "`>='";
228 case OP_GT
: return "`>'";
229 case OP_INC
: return "`++'";
230 case OP_LE
: return "`<='";
231 case OP_LT
: return "`<'";
232 case OP_NE
: return "`!='";
233 case OP_NEG
: return "`!'";
234 case OP_OR
: return "`||'";
235 case OP_PTR
: return "`->'";
236 case OP_SHIFT_LEFT
: return "`<<'";
237 case OPEN_BRACE
: return "`{'";
238 case OPEN_BRACKET
: return "`['";
239 case OPEN_PARENS
: return "`('";
240 case OPEN_REGEX_LITERAL
: return "`/'";
241 case OVERRIDE
: return "`override'";
242 case OWNED
: return "`owned'";
243 case PARAMS
: return "`params'";
244 case PERCENT
: return "`%'";
245 case PLUS
: return "`+'";
246 case PRIVATE
: return "`private'";
247 case PROTECTED
: return "`protected'";
248 case PUBLIC
: return "`public'";
249 case REAL_LITERAL
: return "real literal";
250 case REF
: return "`ref'";
251 case REGEX_LITERAL
: return "regex literal";
252 case REQUIRES
: return "`requires'";
253 case RETURN
: return "`return'";
254 case SEALED
: return "`sealed'";
255 case SEMICOLON
: return "`;'";
256 case SET
: return "`set'";
257 case SIGNAL
: return "`signal'";
258 case SIZEOF
: return "`sizeof'";
259 case STAR
: return "`*'";
260 case STATIC
: return "`static'";
261 case STRING_LITERAL
: return "string literal";
262 case STRUCT
: return "`struct'";
263 case SWITCH
: return "`switch'";
264 case THIS
: return "`this'";
265 case THROW
: return "`throw'";
266 case THROWS
: return "`throws'";
267 case TILDE
: return "`~'";
268 case TRUE
: return "`true'";
269 case TRY
: return "`try'";
270 case TYPEOF
: return "`typeof'";
271 case UNOWNED
: return "`unowned'";
272 case USING
: return "`using'";
273 case VAR
: return "`var'";
274 case VIRTUAL
: return "`virtual'";
275 case VOID
: return "`void'";
276 case VOLATILE
: return "`volatile'";
277 case WEAK
: return "`weak'";
278 case WHILE
: return "`while'";
279 case YIELD
: return "`yield'";
280 default: return "unknown token";