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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 T(INIT_LET, "=init_let", 2) /* AST-use only. */ \ | 54 T(INIT_LET, "=init_let", 2) /* AST-use only. */ \ |
55 T(INIT_CONST, "=init_const", 2) /* AST-use only. */ \ | 55 T(INIT_CONST, "=init_const", 2) /* AST-use only. */ \ |
56 T(INIT_CONST_LEGACY, "=init_const_legacy", 2) /* AST-use only. */ \ | 56 T(INIT_CONST_LEGACY, "=init_const_legacy", 2) /* AST-use only. */ \ |
57 T(ASSIGN, "=", 2) \ | 57 T(ASSIGN, "=", 2) \ |
58 T(ASSIGN_BIT_OR, "|=", 2) \ | 58 T(ASSIGN_BIT_OR, "|=", 2) \ |
59 T(ASSIGN_BIT_XOR, "^=", 2) \ | 59 T(ASSIGN_BIT_XOR, "^=", 2) \ |
60 T(ASSIGN_BIT_AND, "&=", 2) \ | 60 T(ASSIGN_BIT_AND, "&=", 2) \ |
61 T(ASSIGN_SHL, "<<=", 2) \ | 61 T(ASSIGN_SHL, "<<=", 2) \ |
62 T(ASSIGN_SAR, ">>=", 2) \ | 62 T(ASSIGN_SAR, ">>=", 2) \ |
63 T(ASSIGN_SHR, ">>>=", 2) \ | 63 T(ASSIGN_SHR, ">>>=", 2) \ |
64 T(ASSIGN_ADD, "+=", 2) \ | 64 T(ASSIGN_ADD, "+ASSIGN_ADD=", 2) \ |
arv (Not doing code reviews)
2015/05/18 13:12:53
Why?
Dmitry Lomov (no reviews)
2015/05/18 13:41:46
Oops. Undone (it's pathetic that no tests fail :()
| |
65 T(ASSIGN_SUB, "-=", 2) \ | 65 T(ASSIGN_SUB, "-=", 2) \ |
66 T(ASSIGN_MUL, "*=", 2) \ | 66 T(ASSIGN_MUL, "*=", 2) \ |
67 T(ASSIGN_DIV, "/=", 2) \ | 67 T(ASSIGN_DIV, "/=", 2) \ |
68 T(ASSIGN_MOD, "%=", 2) \ | 68 T(ASSIGN_MOD, "%=", 2) \ |
69 \ | 69 \ |
70 /* Binary operators sorted by precedence. */ \ | 70 /* Binary operators sorted by precedence. */ \ |
71 /* IsBinaryOp() relies on this block of enum values */ \ | 71 /* IsBinaryOp() relies on this block of enum values */ \ |
72 /* being contiguous and sorted in the same order! */ \ | 72 /* being contiguous and sorted in the same order! */ \ |
73 T(COMMA, ",", 1) \ | 73 T(COMMA, ",", 1) \ |
74 T(OR, "||", 4) \ | 74 T(OR, "||", 4) \ |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
313 private: | 313 private: |
314 static const char* const name_[NUM_TOKENS]; | 314 static const char* const name_[NUM_TOKENS]; |
315 static const char* const string_[NUM_TOKENS]; | 315 static const char* const string_[NUM_TOKENS]; |
316 static const int8_t precedence_[NUM_TOKENS]; | 316 static const int8_t precedence_[NUM_TOKENS]; |
317 static const char token_type[NUM_TOKENS]; | 317 static const char token_type[NUM_TOKENS]; |
318 }; | 318 }; |
319 | 319 |
320 } } // namespace v8::internal | 320 } } // namespace v8::internal |
321 | 321 |
322 #endif // V8_TOKEN_H_ | 322 #endif // V8_TOKEN_H_ |
OLD | NEW |