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

Unified Diff: lib/compiler/implementation/tree/prettyprint.dart

Issue 10546174: Better PrettyPrinter output for Return nodes, display tokens and expression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address Anton's comments. Created 8 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/tree/prettyprint.dart
diff --git a/lib/compiler/implementation/tree/prettyprint.dart b/lib/compiler/implementation/tree/prettyprint.dart
index cb2eab34dd9f96c44c1cf77409481e67db438295..3baa3926c40c4aa288ce0929c25eacbb451eef9e 100644
--- a/lib/compiler/implementation/tree/prettyprint.dart
+++ b/lib/compiler/implementation/tree/prettyprint.dart
@@ -241,7 +241,12 @@ class PrettyPrinter implements Visitor {
}
visitReturn(Return node) {
- visitNodeWithChildren(node, "Return");
+ var beginToken =
+ node.beginToken !== null ? node.beginToken.stringValue : "null";
+ var endToken = node.endToken !== null ? node.endToken.stringValue : "null";
+ openNode("Return", {"beginToken" : beginToken, "endToken" : endToken});
+ if (node.hasExpression) visitWithPrefix(node.expression, "expression:");
+ closeNode("Return");
}
visitScriptTag(ScriptTag node) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698