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

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

Issue 10456080: Remove printDebugInfo from Unparser (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: another PrettyPrinter interface 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
Index: lib/compiler/implementation/tree/nodes.dart
diff --git a/lib/compiler/implementation/tree/nodes.dart b/lib/compiler/implementation/tree/nodes.dart
index 039b69833d67f55b5fcf9ddb0a79a0c48405dd1e..c52b607b36d5c7ba8f3704a09a9c6e0517a42362 100644
--- a/lib/compiler/implementation/tree/nodes.dart
+++ b/lib/compiler/implementation/tree/nodes.dart
@@ -90,14 +90,22 @@ class Node implements Hashable {
abstract visitChildren(Visitor visitor);
- toString() => unparse(false);
+ /**
+ * Returns this node unparsed to Dart source string.
+ */
+ toString() => unparse();
- toDebugString() => unparse(true);
+ /**
+ * Returns Xml-like tree representation of this node.
+ */
+ toDebugString() {
+ return PrettyPrinter.prettyPrint(this);
+ }
String getObjectDescription() => super.toString();
- String unparse(bool printDebugInfo) {
- Unparser unparser = new Unparser(printDebugInfo);
+ String unparse() {
+ Unparser unparser = new Unparser();
try {
return unparser.unparse(this);
} catch (var e, var trace) {
« no previous file with comments | « no previous file | lib/compiler/implementation/tree/unparser.dart » ('j') | lib/compiler/implementation/tree_validator.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698