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

Unified Diff: lib/src/js/precedence.dart

Issue 1050723002: partially implement instance of checks and some codegen fixes (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/js/nodes.dart ('k') | lib/src/js/printer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/js/precedence.dart
diff --git a/lib/src/js/precedence.dart b/lib/src/js/precedence.dart
index 6d66f1fca5a74c22b24aad9058cede3588202aed..d63253e1d395c2b1d818382556adc8241949a562 100644
--- a/lib/src/js/precedence.dart
+++ b/lib/src/js/precedence.dart
@@ -18,8 +18,7 @@ const ADDITIVE = SHIFT + 1;
const MULTIPLICATIVE = ADDITIVE + 1;
const UNARY = MULTIPLICATIVE + 1;
const LEFT_HAND_SIDE = UNARY + 1;
-// We merge new, call and member expressions.
-// This means that we have to emit parenthesis for 'new's. For example `new X;`
-// should be printed as `new X();`. This simplifies the requirements.
const CALL = LEFT_HAND_SIDE;
-const PRIMARY = CALL + 1;
+// We always emit `new` with parenthesis, so it uses ACCESS as its precedence.
+const ACCESS = CALL + 1;
+const PRIMARY = ACCESS + 1;
« no previous file with comments | « lib/src/js/nodes.dart ('k') | lib/src/js/printer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698