| 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 /** | 5 /** |
| 8 * Pretty-prints Node tree in XML-like format. | 6 * Pretty-prints Node tree in XML-like format. |
| 9 * | 7 * |
| 10 * TODO(smok): Add main() to run from command-line to print out tree for given | 8 * TODO(smok): Add main() to run from command-line to print out tree for given |
| 11 * .dart file. | 9 * .dart file. |
| 12 */ | 10 */ |
| 13 class PrettyPrinter implements Visitor { | 11 class PrettyPrinter implements Visitor { |
| 14 | 12 |
| 15 /** String used to represent one level of indent. */ | 13 /** String used to represent one level of indent. */ |
| 16 static const String INDENT = " "; | 14 static const String INDENT = " "; |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 } | 461 } |
| 464 | 462 |
| 465 visitStringNode(StringNode node) { | 463 visitStringNode(StringNode node) { |
| 466 unimplemented('visitNode', node: node); | 464 unimplemented('visitNode', node: node); |
| 467 } | 465 } |
| 468 | 466 |
| 469 unimplemented(String message, {Node node}) { | 467 unimplemented(String message, {Node node}) { |
| 470 throw message; | 468 throw message; |
| 471 } | 469 } |
| 472 } | 470 } |
| OLD | NEW |