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

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

Issue 9634008: Introduce element categories and move resolver towards being more compositional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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: dart/frog/leg/tree/nodes.dart
diff --git a/dart/frog/leg/tree/nodes.dart b/dart/frog/leg/tree/nodes.dart
index 79a7929d49201dae9d5e9a9e9a96eea6010e4844..35e3098e153ee55400402fb763e87d44776cc838 100644
--- a/dart/frog/leg/tree/nodes.dart
+++ b/dart/frog/leg/tree/nodes.dart
@@ -80,12 +80,14 @@ class Node implements Hashable {
abstract visitChildren(Visitor visitor);
- toString() => unparse();
+ toString() => unparse(false);
+
+ toDebugString() => unparse(true);
String getObjectDescription() => super.toString();
- String unparse() {
- Unparser unparser = new Unparser();
+ String unparse(bool printDebugInfo) {
karlklose 2012/03/08 14:01:45 How about making this an optional argument?
ahe 2012/03/08 18:13:40 I'm not sure I see the point?
+ Unparser unparser = new Unparser(printDebugInfo);
try {
return unparser.unparse(this);
} catch (var e, var trace) {
@@ -954,7 +956,6 @@ class Identifier extends Expression {
SourceString get source() => token.value;
Identifier(Token this.token);
- Identifier.synthetic(String name) : token = new StringToken(null, name, null);
bool isThis() => source.stringValue === 'this';
@@ -973,7 +974,6 @@ class Identifier extends Expression {
class Operator extends Identifier {
Operator(Token token) : super(token);
- Operator.synthetic(String name) : super.synthetic(name);
Operator asOperator() => this;

Powered by Google App Engine
This is Rietveld 408576698