Allow structs to contain arrays.
1 /* vim: set ts=4 sw=4 tw=99 et:
3 * Copyright (C) 2012 David Anderson
5 * This file is part of SourcePawn.
7 * SourcePawn is free software: you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License as published by the Free
9 * Software Foundation, either version 3 of the License, or (at your option)
12 * SourcePawn is distributed in the hope that it will be useful, but WITHOUT ANY
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with
17 * SourcePawn. If not, see http://www.gnu.org/licenses/.
19 #ifndef _include_jitcraft_token_h_
20 #define _include_jitcraft_token_h_
35 SourcePosition(unsigned line, unsigned col)
42 // List of tokens the scanner can recognize.
45 // * (ASSIGN_ADD - TOK_PLUS) must be the delta between an operator and its
46 // op-and-assign equivalent.
52 _(RETURN, "'return'") \
54 _(INTEGER_LITERAL, "<integer>") \
55 _(HEX_LITERAL, "<hex>") \
56 _(FLOAT_LITERAL, "<float>") \
57 _(STRING_LITERAL, "<string>") \
65 _(CONTINUE, "<continue>") \
66 _(FORWARD, "<forward>") \
67 _(PUBLIC, "<public>") \
69 _(NATIVE, "<native>") \
73 _(STRUCT, "<struct>") \
74 _(SWITCH, "<switch>") \
76 _(DEFAULT, "<default>") \
77 _(TYPEDEF, "<typedef>") \
100 _(ASSIGN_ADD, "+=") \
101 _(ASSIGN_SUB, "-=") \
102 _(ASSIGN_MUL, "*=") \
103 _(ASSIGN_DIV, "/=") \
104 _(ASSIGN_MOD, "%=") \
105 _(ASSIGN_BITAND, "&=") \
106 _(ASSIGN_BITOR, "|=") \
107 _(ASSIGN_BITXOR, "^=") \
108 _(ASSIGN_SHR, ">>=") \
109 _(ASSIGN_USHR, ">>>=") \
110 _(ASSIGN_SHL, "<<=") \
128 _(EOF, "<end-of-file>")
132 # define _(name, str) TOK_##name,
135 TOK_BITAND = TOK_AMPERSAND,
139 extern const char *TokenNames[];
143 #endif //_include_jitcraft_token_h_