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

Unified Diff: dart/frog/leg/tree/unparser.dart

Issue 8660004: Parse parenthesized expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: frogsh Created 9 years, 1 month 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 | « dart/frog/leg/tree/nodes.dart ('k') | dart/frog/leg/tree/visitors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/tree/unparser.dart
diff --git a/dart/frog/leg/tree/unparser.dart b/dart/frog/leg/tree/unparser.dart
index d643f957b118a283961da23104d9af8d898be777..57b5ad9a18ba1e39c5457b0f1416f8b5a573e687 100644
--- a/dart/frog/leg/tree/unparser.dart
+++ b/dart/frog/leg/tree/unparser.dart
@@ -184,18 +184,22 @@ class Unparser implements Visitor {
visit(node.body);
sb.add(' ');
add(node.whileKeyword.value);
- sb.add(' (');
+ sb.add(' ');
visit(node.condition);
- sb.add(')');
sb.add(node.endToken.value);
}
visitWhile(While node) {
add(node.whileKeyword.value);
- sb.add(' (');
+ sb.add(' ');
visit(node.condition);
- sb.add(')');
sb.add(' ');
visit(node.body);
}
+
+ visitParenthesizedExpression(ParenthesizedExpression node) {
+ add(node.getBeginToken().value);
+ visit(node.expression);
+ add(node.getEndToken().value);
+ }
}
« no previous file with comments | « dart/frog/leg/tree/nodes.dart ('k') | dart/frog/leg/tree/visitors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698