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 const EXPRESSION = 0; | 5 const EXPRESSION = 0; |
6 const SPREAD = EXPRESSION + 1; | 6 const SPREAD = EXPRESSION + 1; |
7 const YIELD = SPREAD + 1; | 7 const YIELD = SPREAD + 1; |
8 | 8 |
9 // Note that some primary expressions (in the parser) must be emitted with lower | 9 // Note that some primary expressions (in the parser) must be emitted with lower |
10 // precedence, because it's not normally legal for them to be followed by | 10 // precedence, because it's not normally legal for them to be followed by |
(...skipping 14 matching lines...) Expand all Loading... |
25 const RELATIONAL = EQUALITY + 1; | 25 const RELATIONAL = EQUALITY + 1; |
26 const SHIFT = RELATIONAL + 1; | 26 const SHIFT = RELATIONAL + 1; |
27 const ADDITIVE = SHIFT + 1; | 27 const ADDITIVE = SHIFT + 1; |
28 const MULTIPLICATIVE = ADDITIVE + 1; | 28 const MULTIPLICATIVE = ADDITIVE + 1; |
29 const UNARY = MULTIPLICATIVE + 1; | 29 const UNARY = MULTIPLICATIVE + 1; |
30 const LEFT_HAND_SIDE = UNARY + 1; | 30 const LEFT_HAND_SIDE = UNARY + 1; |
31 const CALL = LEFT_HAND_SIDE; | 31 const CALL = LEFT_HAND_SIDE; |
32 // We always emit `new` with parenthesis, so it uses ACCESS as its precedence. | 32 // We always emit `new` with parenthesis, so it uses ACCESS as its precedence. |
33 const ACCESS = CALL + 1; | 33 const ACCESS = CALL + 1; |
34 const PRIMARY = ACCESS + 1; | 34 const PRIMARY = ACCESS + 1; |
OLD | NEW |