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

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

Issue 10834374: Add a field to ClassNode that holds a NodeList of its members. (Closed) Base URL: http://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
« no previous file with comments | « lib/compiler/implementation/tree/nodes.dart ('k') | tests/compiler/dart2js/unparser2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/tree/unparser.dart
===================================================================
--- lib/compiler/implementation/tree/unparser.dart (revision 11072)
+++ lib/compiler/implementation/tree/unparser.dart (working copy)
@@ -60,6 +60,9 @@
visitClassNode(ClassNode node) {
addToken(node.beginToken);
visit(node.name);
+ if (node.typeParameters !== null) {
+ visit(node.typeParameters);
+ }
sb.add(' ');
if (node.extendsKeyword !== null) {
addToken(node.extendsKeyword);
@@ -72,6 +75,15 @@
sb.add(' ');
}
sb.add('{\n');
+ NodeList body = node.body;
+ if (body !== null) {
+ Link nodes = body.nodes;
+ if (!nodes.isEmpty()) {
+ sb.add(' ');
+ nodes.printOn(sb, '\n ');
+ sb.add('\n');
+ }
+ }
sb.add('}\n');
}
« no previous file with comments | « lib/compiler/implementation/tree/nodes.dart ('k') | tests/compiler/dart2js/unparser2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698