OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 /* Identifiers (not keywords or future reserved words). */ \ | 166 /* Identifiers (not keywords or future reserved words). */ \ |
167 T(IDENTIFIER, NULL, 0) \ | 167 T(IDENTIFIER, NULL, 0) \ |
168 \ | 168 \ |
169 /* Future reserved words (ECMA-262, section 7.6.1.2). */ \ | 169 /* Future reserved words (ECMA-262, section 7.6.1.2). */ \ |
170 T(FUTURE_RESERVED_WORD, NULL, 0) \ | 170 T(FUTURE_RESERVED_WORD, NULL, 0) \ |
171 T(FUTURE_STRICT_RESERVED_WORD, NULL, 0) \ | 171 T(FUTURE_STRICT_RESERVED_WORD, NULL, 0) \ |
172 K(CONST, "const", 0) \ | 172 K(CONST, "const", 0) \ |
173 K(EXPORT, "export", 0) \ | 173 K(EXPORT, "export", 0) \ |
174 K(IMPORT, "import", 0) \ | 174 K(IMPORT, "import", 0) \ |
175 K(LET, "let", 0) \ | 175 K(LET, "let", 0) \ |
176 K(MODULE, "module", 0) \ | |
177 \ | 176 \ |
178 /* Illegal token - not able to scan. */ \ | 177 /* Illegal token - not able to scan. */ \ |
179 T(ILLEGAL, "ILLEGAL", 0) \ | 178 T(ILLEGAL, "ILLEGAL", 0) \ |
180 \ | 179 \ |
181 /* Scanner-internal use only. */ \ | 180 /* Scanner-internal use only. */ \ |
182 T(WHITESPACE, NULL, 0) | 181 T(WHITESPACE, NULL, 0) |
183 | 182 |
184 | 183 |
185 class Token { | 184 class Token { |
186 public: | 185 public: |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 private: | 287 private: |
289 static const char* const name_[NUM_TOKENS]; | 288 static const char* const name_[NUM_TOKENS]; |
290 static const char* const string_[NUM_TOKENS]; | 289 static const char* const string_[NUM_TOKENS]; |
291 static const int8_t precedence_[NUM_TOKENS]; | 290 static const int8_t precedence_[NUM_TOKENS]; |
292 static const char token_type[NUM_TOKENS]; | 291 static const char token_type[NUM_TOKENS]; |
293 }; | 292 }; |
294 | 293 |
295 } } // namespace v8::internal | 294 } } // namespace v8::internal |
296 | 295 |
297 #endif // V8_TOKEN_H_ | 296 #endif // V8_TOKEN_H_ |
OLD | NEW |