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

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

Issue 10690164: PrettyPrinter, some enhancements for FunctionExpression and Send. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 f691e9fcc9a96558a6cbcf27cfe7209a52d3d534..2653b0be106264b1fe3c19ff24775178da953814 100644
--- a/lib/compiler/implementation/tree/prettyprint.dart
+++ b/lib/compiler/implementation/tree/prettyprint.dart
@@ -163,7 +163,16 @@ class PrettyPrinter implements Visitor {
}
visitFunctionExpression(FunctionExpression node) {
- visitNodeWithChildren(node, "FunctionExpression");
+ openNode("FunctionExpression", {
+ "getOrSet" : tokenToStringOrNull(node.getOrSet)
+ });
+ visitWithPrefix(node.modifiers, "modifiers:");
+ visitWithPrefix(node.returnType, "returnType:");
+ visitWithPrefix(node.name, "name:");
+ visitWithPrefix(node.parameters, "parameters:");
+ visitWithPrefix(node.initializers, "initializers:");
+ visitWithPrefix(node.body, "body:");
+ closeNode("FunctionExpression");
}
visitIdentifier(Identifier node) {
@@ -287,7 +296,9 @@ class PrettyPrinter implements Visitor {
openNode(type, {
"isPrefix" : "${node.isPrefix}",
"isPostfix" : "${node.isPostfix}",
- "isIndex" : "${node.isIndex}"
+ "isIndex" : "${node.isIndex}",
+ "beginToken" : tokenToStringOrNull(node.getBeginToken()),
+ "endToken" : tokenToStringOrNull(node.getEndToken())
});
visitWithPrefix(node.receiver, "receiver:");
visitWithPrefix(node.selector, "selector:");
« 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