OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 /* Identifiers (not keywords or future reserved words). */ \ | 167 /* Identifiers (not keywords or future reserved words). */ \ |
168 T(IDENTIFIER, NULL, 0) \ | 168 T(IDENTIFIER, NULL, 0) \ |
169 \ | 169 \ |
170 /* Future reserved words (ECMA-262, section 7.6.1.2). */ \ | 170 /* Future reserved words (ECMA-262, section 7.6.1.2). */ \ |
171 T(FUTURE_RESERVED_WORD, NULL, 0) \ | 171 T(FUTURE_RESERVED_WORD, NULL, 0) \ |
172 T(FUTURE_STRICT_RESERVED_WORD, NULL, 0) \ | 172 T(FUTURE_STRICT_RESERVED_WORD, NULL, 0) \ |
173 K(CONST, "const", 0) \ | 173 K(CONST, "const", 0) \ |
174 K(EXPORT, "export", 0) \ | 174 K(EXPORT, "export", 0) \ |
175 K(IMPORT, "import", 0) \ | 175 K(IMPORT, "import", 0) \ |
176 K(LET, "let", 0) \ | 176 K(LET, "let", 0) \ |
| 177 K(YIELD, "yield", 0) \ |
177 \ | 178 \ |
178 /* Illegal token - not able to scan. */ \ | 179 /* Illegal token - not able to scan. */ \ |
179 T(ILLEGAL, "ILLEGAL", 0) \ | 180 T(ILLEGAL, "ILLEGAL", 0) \ |
180 \ | 181 \ |
181 /* Scanner-internal use only. */ \ | 182 /* Scanner-internal use only. */ \ |
182 T(WHITESPACE, NULL, 0) | 183 T(WHITESPACE, NULL, 0) |
183 | 184 |
184 | 185 |
185 class Token { | 186 class Token { |
186 public: | 187 public: |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 private: | 293 private: |
293 static const char* const name_[NUM_TOKENS]; | 294 static const char* const name_[NUM_TOKENS]; |
294 static const char* const string_[NUM_TOKENS]; | 295 static const char* const string_[NUM_TOKENS]; |
295 static const int8_t precedence_[NUM_TOKENS]; | 296 static const int8_t precedence_[NUM_TOKENS]; |
296 static const char token_type[NUM_TOKENS]; | 297 static const char token_type[NUM_TOKENS]; |
297 }; | 298 }; |
298 | 299 |
299 } } // namespace v8::internal | 300 } } // namespace v8::internal |
300 | 301 |
301 #endif // V8_TOKEN_H_ | 302 #endif // V8_TOKEN_H_ |
OLD | NEW |