Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: lib/src/js/precedence.dart

Issue 1644823002: Remove library tags, they aren't needed (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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;
6
7 const EXPRESSION = 0; 5 const EXPRESSION = 0;
8 const SPREAD = EXPRESSION + 1; 6 const SPREAD = EXPRESSION + 1;
9 const YIELD = SPREAD + 1; 7 const YIELD = SPREAD + 1;
10 8
11 // 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
12 // 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
13 // other postfix expressions, like ACCESS and CALL. For example: 11 // other postfix expressions, like ACCESS and CALL. For example:
14 // `function foo(){}` needs parens to call or access properties or 12 // `function foo(){}` needs parens to call or access properties or
15 // compare with equality. Same thing with `class Foo {}` and `(x) => x`. 13 // compare with equality. Same thing with `class Foo {}` and `(x) => x`.
16 // However, prefix unary expressions will work in these cases. Unfortunately our 14 // However, prefix unary expressions will work in these cases. Unfortunately our
(...skipping 10 matching lines...) Expand all
27 const RELATIONAL = EQUALITY + 1; 25 const RELATIONAL = EQUALITY + 1;
28 const SHIFT = RELATIONAL + 1; 26 const SHIFT = RELATIONAL + 1;
29 const ADDITIVE = SHIFT + 1; 27 const ADDITIVE = SHIFT + 1;
30 const MULTIPLICATIVE = ADDITIVE + 1; 28 const MULTIPLICATIVE = ADDITIVE + 1;
31 const UNARY = MULTIPLICATIVE + 1; 29 const UNARY = MULTIPLICATIVE + 1;
32 const LEFT_HAND_SIDE = UNARY + 1; 30 const LEFT_HAND_SIDE = UNARY + 1;
33 const CALL = LEFT_HAND_SIDE; 31 const CALL = LEFT_HAND_SIDE;
34 // 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.
35 const ACCESS = CALL + 1; 33 const ACCESS = CALL + 1;
36 const PRIMARY = ACCESS + 1; 34 const PRIMARY = ACCESS + 1;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698