| 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; |
| 6 |
| 5 String unparse(Node node) { | 7 String unparse(Node node) { |
| 6 Unparser unparser = new Unparser(); | 8 Unparser unparser = new Unparser(); |
| 7 unparser.unparse(node); | 9 unparser.unparse(node); |
| 8 return unparser.result; | 10 return unparser.result; |
| 9 } | 11 } |
| 10 | 12 |
| 11 class Unparser implements Visitor { | 13 class Unparser implements Visitor { |
| 12 final StringBuffer sb; | 14 final StringBuffer sb; |
| 13 | 15 |
| 14 String get result => sb.toString(); | 16 String get result => sb.toString(); |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 } | 593 } |
| 592 | 594 |
| 593 visitStatement(Statement node) { | 595 visitStatement(Statement node) { |
| 594 throw 'internal error'; // Should not be called. | 596 throw 'internal error'; // Should not be called. |
| 595 } | 597 } |
| 596 | 598 |
| 597 visitStringNode(StringNode node) { | 599 visitStringNode(StringNode node) { |
| 598 throw 'internal error'; // Should not be called. | 600 throw 'internal error'; // Should not be called. |
| 599 } | 601 } |
| 600 } | 602 } |
| OLD | NEW |