| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of tree; | 5 part of tree; |
| 6 | 6 |
| 7 String unparse(Node node) { | 7 String unparse(Node node) { |
| 8 Unparser unparser = new Unparser(); | 8 Unparser unparser = new Unparser(); |
| 9 unparser.unparse(node); | 9 unparser.unparse(node); |
| 10 return unparser.result; | 10 return unparser.result; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 for (final member in members) { | 74 for (final member in members) { |
| 75 visit(member); | 75 visit(member); |
| 76 } | 76 } |
| 77 sb.add('}'); | 77 sb.add('}'); |
| 78 } | 78 } |
| 79 | 79 |
| 80 visitClassNode(ClassNode node) { | 80 visitClassNode(ClassNode node) { |
| 81 unparseClassWithBody(node, node.body.nodes); | 81 unparseClassWithBody(node, node.body.nodes); |
| 82 } | 82 } |
| 83 | 83 |
| 84 visitMixinApplication(MixinApplication node) { |
| 85 if (!node.modifiers.nodes.isEmpty) { |
| 86 visit(node.modifiers); |
| 87 sb.add(' '); |
| 88 } |
| 89 visit(node.superclass); |
| 90 sb.add(' with '); |
| 91 visit(node.mixins); |
| 92 } |
| 93 |
| 84 visitConditional(Conditional node) { | 94 visitConditional(Conditional node) { |
| 85 visit(node.condition); | 95 visit(node.condition); |
| 86 add(node.questionToken.value); | 96 add(node.questionToken.value); |
| 87 visit(node.thenExpression); | 97 visit(node.thenExpression); |
| 88 add(node.colonToken.value); | 98 add(node.colonToken.value); |
| 89 visit(node.elseExpression); | 99 visit(node.elseExpression); |
| 90 } | 100 } |
| 91 | 101 |
| 92 visitExpressionStatement(ExpressionStatement node) { | 102 visitExpressionStatement(ExpressionStatement node) { |
| 93 visit(node.expression); | 103 visit(node.expression); |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 } | 606 } |
| 597 | 607 |
| 598 visitStatement(Statement node) { | 608 visitStatement(Statement node) { |
| 599 throw 'internal error'; // Should not be called. | 609 throw 'internal error'; // Should not be called. |
| 600 } | 610 } |
| 601 | 611 |
| 602 visitStringNode(StringNode node) { | 612 visitStringNode(StringNode node) { |
| 603 throw 'internal error'; // Should not be called. | 613 throw 'internal error'; // Should not be called. |
| 604 } | 614 } |
| 605 } | 615 } |
| OLD | NEW |