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