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