| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_TOKEN_H_ | 5 #ifndef V8_TOKEN_H_ |
| 6 #define V8_TOKEN_H_ | 6 #define V8_TOKEN_H_ |
| 7 | 7 |
| 8 #include "src/base/logging.h" | 8 #include "src/base/logging.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 T(IDENTIFIER, NULL, 0) \ | 146 T(IDENTIFIER, NULL, 0) \ |
| 147 \ | 147 \ |
| 148 /* Future reserved words (ECMA-262, section 7.6.1.2). */ \ | 148 /* Future reserved words (ECMA-262, section 7.6.1.2). */ \ |
| 149 T(FUTURE_RESERVED_WORD, NULL, 0) \ | 149 T(FUTURE_RESERVED_WORD, NULL, 0) \ |
| 150 T(FUTURE_STRICT_RESERVED_WORD, NULL, 0) \ | 150 T(FUTURE_STRICT_RESERVED_WORD, NULL, 0) \ |
| 151 K(CONST, "const", 0) \ | 151 K(CONST, "const", 0) \ |
| 152 K(EXPORT, "export", 0) \ | 152 K(EXPORT, "export", 0) \ |
| 153 K(IMPORT, "import", 0) \ | 153 K(IMPORT, "import", 0) \ |
| 154 K(LET, "let", 0) \ | 154 K(LET, "let", 0) \ |
| 155 K(YIELD, "yield", 0) \ | 155 K(YIELD, "yield", 0) \ |
| 156 K(SUPER, "super", 0) \ |
| 156 \ | 157 \ |
| 157 /* Illegal token - not able to scan. */ \ | 158 /* Illegal token - not able to scan. */ \ |
| 158 T(ILLEGAL, "ILLEGAL", 0) \ | 159 T(ILLEGAL, "ILLEGAL", 0) \ |
| 159 \ | 160 \ |
| 160 /* Scanner-internal use only. */ \ | 161 /* Scanner-internal use only. */ \ |
| 161 T(WHITESPACE, NULL, 0) | 162 T(WHITESPACE, NULL, 0) |
| 162 | 163 |
| 163 | 164 |
| 164 class Token { | 165 class Token { |
| 165 public: | 166 public: |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 private: | 285 private: |
| 285 static const char* const name_[NUM_TOKENS]; | 286 static const char* const name_[NUM_TOKENS]; |
| 286 static const char* const string_[NUM_TOKENS]; | 287 static const char* const string_[NUM_TOKENS]; |
| 287 static const int8_t precedence_[NUM_TOKENS]; | 288 static const int8_t precedence_[NUM_TOKENS]; |
| 288 static const char token_type[NUM_TOKENS]; | 289 static const char token_type[NUM_TOKENS]; |
| 289 }; | 290 }; |
| 290 | 291 |
| 291 } } // namespace v8::internal | 292 } } // namespace v8::internal |
| 292 | 293 |
| 293 #endif // V8_TOKEN_H_ | 294 #endif // V8_TOKEN_H_ |
| OLD | NEW |