Chromium Code Reviews| Index: lib/compiler/implementation/tree/unparser.dart |
| =================================================================== |
| --- lib/compiler/implementation/tree/unparser.dart (revision 10901) |
| +++ 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,21 @@ |
| sb.add(' '); |
| } |
| sb.add('{\n'); |
| + NodeList body = node.body; |
| + if (body != null) { |
| + Link nodes = body.nodes; |
| + if (!nodes.isEmpty()) { |
|
ahe
2012/08/21 11:56:17
This is probably:
nodes.printOn(sb, '\n ');
messick
2012/08/21 15:35:40
That would leave indentation at the end of the las
ahe
2012/08/21 15:43:16
That would be a bug in printOn. The second argumen
messick
2012/08/21 16:31:19
Done.
|
| + String indent = " "; |
| + sb.add(indent); |
| + visit(nodes.head); |
| + sb.add("\n"); |
| + for (Link node = nodes.tail; !node.isEmpty(); node = node.tail) { |
| + sb.add(indent); |
| + visit(node.head); |
| + sb.add("\n"); |
| + } |
| + } |
| + } |
| sb.add('}\n'); |
| } |