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

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

Issue 10919033: Rework Unparser/unparse StringBuffer management. (Closed) Base URL: https://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
Index: lib/compiler/implementation/tree/nodes.dart
diff --git a/lib/compiler/implementation/tree/nodes.dart b/lib/compiler/implementation/tree/nodes.dart
index c535d9a697bd9042dc5204530859e1056432fdc8..7fd2edc2f94d53524b1c36c5a86166b7582235ad 100644
--- a/lib/compiler/implementation/tree/nodes.dart
+++ b/lib/compiler/implementation/tree/nodes.dart
@@ -99,7 +99,7 @@ class Node implements Hashable {
/**
* Returns this node unparsed to Dart source string.
*/
- toString() => unparse();
+ toString() => unparse(this);
/**
* Returns Xml-like tree representation of this node.
@@ -110,16 +110,6 @@ class Node implements Hashable {
String getObjectDescription() => super.toString();
- String unparse() {
- Unparser unparser = new Unparser();
- try {
- return unparser.unparse(this);
- } catch (e, trace) {
- print(trace);
- return '<<unparse error: ${getObjectDescription()}: ${unparser.sb}>>';
- }
- }
-
abstract Token getBeginToken();
abstract Token getEndToken();

Powered by Google App Engine
This is Rietveld 408576698