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 "checks.h" | 8 #include "checks.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 24 matching lines...) Expand all Loading... |
35 T(LBRACK, "[", 0) \ | 35 T(LBRACK, "[", 0) \ |
36 T(RBRACK, "]", 0) \ | 36 T(RBRACK, "]", 0) \ |
37 T(LBRACE, "{", 0) \ | 37 T(LBRACE, "{", 0) \ |
38 T(RBRACE, "}", 0) \ | 38 T(RBRACE, "}", 0) \ |
39 T(COLON, ":", 0) \ | 39 T(COLON, ":", 0) \ |
40 T(SEMICOLON, ";", 0) \ | 40 T(SEMICOLON, ";", 0) \ |
41 T(PERIOD, ".", 0) \ | 41 T(PERIOD, ".", 0) \ |
42 T(CONDITIONAL, "?", 3) \ | 42 T(CONDITIONAL, "?", 3) \ |
43 T(INC, "++", 0) \ | 43 T(INC, "++", 0) \ |
44 T(DEC, "--", 0) \ | 44 T(DEC, "--", 0) \ |
| 45 T(ARROW, "=>", 0) \ |
45 \ | 46 \ |
46 /* Assignment operators. */ \ | 47 /* Assignment operators. */ \ |
47 /* IsAssignmentOp() and Assignment::is_compound() relies on */ \ | 48 /* IsAssignmentOp() and Assignment::is_compound() relies on */ \ |
48 /* this block of enum values being contiguous and sorted in the */ \ | 49 /* this block of enum values being contiguous and sorted in the */ \ |
49 /* same order! */ \ | 50 /* same order! */ \ |
50 T(INIT_VAR, "=init_var", 2) /* AST-use only. */ \ | 51 T(INIT_VAR, "=init_var", 2) /* AST-use only. */ \ |
51 T(INIT_LET, "=init_let", 2) /* AST-use only. */ \ | 52 T(INIT_LET, "=init_let", 2) /* AST-use only. */ \ |
52 T(INIT_CONST, "=init_const", 2) /* AST-use only. */ \ | 53 T(INIT_CONST, "=init_const", 2) /* AST-use only. */ \ |
53 T(INIT_CONST_LEGACY, "=init_const_legacy", 2) /* AST-use only. */ \ | 54 T(INIT_CONST_LEGACY, "=init_const_legacy", 2) /* AST-use only. */ \ |
54 T(ASSIGN, "=", 2) \ | 55 T(ASSIGN, "=", 2) \ |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 private: | 284 private: |
284 static const char* const name_[NUM_TOKENS]; | 285 static const char* const name_[NUM_TOKENS]; |
285 static const char* const string_[NUM_TOKENS]; | 286 static const char* const string_[NUM_TOKENS]; |
286 static const int8_t precedence_[NUM_TOKENS]; | 287 static const int8_t precedence_[NUM_TOKENS]; |
287 static const char token_type[NUM_TOKENS]; | 288 static const char token_type[NUM_TOKENS]; |
288 }; | 289 }; |
289 | 290 |
290 } } // namespace v8::internal | 291 } } // namespace v8::internal |
291 | 292 |
292 #endif // V8_TOKEN_H_ | 293 #endif // V8_TOKEN_H_ |
OLD | NEW |