OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library precedence; | 5 library precedence; |
6 | 6 |
7 const EXPRESSION = 0; | 7 const EXPRESSION = 0; |
8 const SPREAD = EXPRESSION + 1; | 8 const SPREAD = EXPRESSION + 1; |
9 const ASSIGNMENT = SPREAD + 1; | 9 const YIELD = SPREAD + 1; |
Jennifer Messerly
2015/06/25 18:17:45
https://developer.mozilla.org/en-US/docs/Web/JavaS
| |
10 const ASSIGNMENT = YIELD + 1; | |
10 const LOGICAL_OR = ASSIGNMENT + 1; | 11 const LOGICAL_OR = ASSIGNMENT + 1; |
11 const LOGICAL_AND = LOGICAL_OR + 1; | 12 const LOGICAL_AND = LOGICAL_OR + 1; |
12 const BIT_OR = LOGICAL_AND + 1; | 13 const BIT_OR = LOGICAL_AND + 1; |
13 const BIT_XOR = BIT_OR + 1; | 14 const BIT_XOR = BIT_OR + 1; |
14 const BIT_AND = BIT_XOR + 1; | 15 const BIT_AND = BIT_XOR + 1; |
15 const EQUALITY = BIT_AND + 1; | 16 const EQUALITY = BIT_AND + 1; |
16 const RELATIONAL = EQUALITY + 1; | 17 const RELATIONAL = EQUALITY + 1; |
17 const SHIFT = RELATIONAL + 1; | 18 const SHIFT = RELATIONAL + 1; |
18 const ADDITIVE = SHIFT + 1; | 19 const ADDITIVE = SHIFT + 1; |
19 const MULTIPLICATIVE = ADDITIVE + 1; | 20 const MULTIPLICATIVE = ADDITIVE + 1; |
20 const UNARY = MULTIPLICATIVE + 1; | 21 const UNARY = MULTIPLICATIVE + 1; |
21 const LEFT_HAND_SIDE = UNARY + 1; | 22 const LEFT_HAND_SIDE = UNARY + 1; |
22 const CALL = LEFT_HAND_SIDE; | 23 const CALL = LEFT_HAND_SIDE; |
23 // We always emit `new` with parenthesis, so it uses ACCESS as its precedence. | 24 // We always emit `new` with parenthesis, so it uses ACCESS as its precedence. |
24 const ACCESS = CALL + 1; | 25 const ACCESS = CALL + 1; |
25 const PRIMARY = ACCESS + 1; | 26 const PRIMARY = ACCESS + 1; |
OLD | NEW |