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

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

Issue 698563005: Support parsing of enums in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add unparser test. Created 6 years, 1 month 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: sdk/lib/_internal/compiler/implementation/tree/unparser.dart
diff --git a/sdk/lib/_internal/compiler/implementation/tree/unparser.dart b/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
index 288b31a8f26771466b4933141f38f78dae896d55..c929e9281a645f0442d153ed51002fa6f9737c3c 100644
--- a/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
+++ b/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
@@ -124,6 +124,13 @@ class Unparser extends Indentation implements Visitor {
write('}');
}
+ visitEnum(Enum node) {
+ sb.write('enum ');
+ visit(node.name);
floitsch 2014/11/06 12:41:58 Why don't we need "{" and "}" here?
Johnni Winther 2014/11/06 12:49:41 It is in the NodeList [names].
+ sb.write(' ');
+ visit(node.names);
+ }
+
visitClassNode(ClassNode node) {
unparseClassWithBody(node, node.body.nodes);
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/tree/prettyprint.dart ('k') | tests/compiler/dart2js/unparser2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698