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