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

Unified Diff: lib/compiler/implementation/js/nodes.dart

Issue 10860036: Few tweaks to the generated code to avoid eg parenthesis. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | « no previous file | lib/compiler/implementation/js/printer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/js/nodes.dart
===================================================================
--- lib/compiler/implementation/js/nodes.dart (revision 10937)
+++ lib/compiler/implementation/js/nodes.dart (working copy)
@@ -442,7 +442,9 @@
for (Expression expr in inputs) expr.accept(visitor);
}
- int get precedenceLevel() => EXPRESSION;
+ // Code that uses JS must take care of operator precedences, and
+ // put parenthesis if needed.
+ int get precedenceLevel() => PRIMARY;
}
/**
« no previous file with comments | « no previous file | lib/compiler/implementation/js/printer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698