| 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 #include "src/globals.h" | 9 #include "src/globals.h" |
| 10 | 10 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 K(LET, "let", 0) \ | 159 K(LET, "let", 0) \ |
| 160 K(STATIC, "static", 0) \ | 160 K(STATIC, "static", 0) \ |
| 161 K(YIELD, "yield", 0) \ | 161 K(YIELD, "yield", 0) \ |
| 162 K(SUPER, "super", 0) \ | 162 K(SUPER, "super", 0) \ |
| 163 \ | 163 \ |
| 164 /* Illegal token - not able to scan. */ \ | 164 /* Illegal token - not able to scan. */ \ |
| 165 T(ILLEGAL, "ILLEGAL", 0) \ | 165 T(ILLEGAL, "ILLEGAL", 0) \ |
| 166 \ | 166 \ |
| 167 /* Scanner-internal use only. */ \ | 167 /* Scanner-internal use only. */ \ |
| 168 T(WHITESPACE, NULL, 0) \ | 168 T(WHITESPACE, NULL, 0) \ |
| 169 T(UNINITIALIZED, NULL, 0) \ |
| 169 \ | 170 \ |
| 170 /* ES6 Template Literals */ \ | 171 /* ES6 Template Literals */ \ |
| 171 T(TEMPLATE_SPAN, NULL, 0) \ | 172 T(TEMPLATE_SPAN, NULL, 0) \ |
| 172 T(TEMPLATE_TAIL, NULL, 0) | 173 T(TEMPLATE_TAIL, NULL, 0) |
| 173 | 174 |
| 174 | 175 |
| 175 class Token { | 176 class Token { |
| 176 public: | 177 public: |
| 177 // All token values. | 178 // All token values. |
| 178 #define T(name, string, precedence) name, | 179 #define T(name, string, precedence) name, |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 private: | 314 private: |
| 314 static const char* const name_[NUM_TOKENS]; | 315 static const char* const name_[NUM_TOKENS]; |
| 315 static const char* const string_[NUM_TOKENS]; | 316 static const char* const string_[NUM_TOKENS]; |
| 316 static const int8_t precedence_[NUM_TOKENS]; | 317 static const int8_t precedence_[NUM_TOKENS]; |
| 317 static const char token_type[NUM_TOKENS]; | 318 static const char token_type[NUM_TOKENS]; |
| 318 }; | 319 }; |
| 319 | 320 |
| 320 } } // namespace v8::internal | 321 } } // namespace v8::internal |
| 321 | 322 |
| 322 #endif // V8_TOKEN_H_ | 323 #endif // V8_TOKEN_H_ |
| OLD | NEW |