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

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

Issue 10392024: Add a "Label" Node around an Identifier that is being used as a label. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Only use Label nodes for label introductions. Include the colon. Created 8 years, 7 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/unparser.dart
diff --git a/lib/compiler/implementation/tree/unparser.dart b/lib/compiler/implementation/tree/unparser.dart
index 9aaad5f83ccd6deef031c158a2a2ba0282cca91f..17852756cf2781af25b2609512899147492ac7cb 100644
--- a/lib/compiler/implementation/tree/unparser.dart
+++ b/lib/compiler/implementation/tree/unparser.dart
@@ -307,9 +307,13 @@ class Unparser implements Visitor {
visit(node.body);
}
+ visitLabel(Label node) {
+ visit(node.identifier);
+ add(node.colonToken.value);
+ }
+
visitLabeledStatement(LabeledStatement node) {
visit(node.label);
- add(node.colonToken.value);
sb.add(' ');
visit(node.statement);
}

Powered by Google App Engine
This is Rietveld 408576698