| 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 /** | 7 /** |
| 8 * Pretty-prints Node tree in XML-like format. | 8 * Pretty-prints Node tree in XML-like format. |
| 9 * | 9 * |
| 10 * TODO(smok): Add main() to run from command-line to print out tree for given | 10 * TODO(smok): Add main() to run from command-line to print out tree for given |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 } | 145 } |
| 146 | 146 |
| 147 visitClassNode(ClassNode node) { | 147 visitClassNode(ClassNode node) { |
| 148 openNode(node, "ClassNode", { | 148 openNode(node, "ClassNode", { |
| 149 "extendsKeyword" : tokenToStringOrNull(node.extendsKeyword) | 149 "extendsKeyword" : tokenToStringOrNull(node.extendsKeyword) |
| 150 }); | 150 }); |
| 151 visitChildNode(node.name, "name"); | 151 visitChildNode(node.name, "name"); |
| 152 visitChildNode(node.superclass, "superclass"); | 152 visitChildNode(node.superclass, "superclass"); |
| 153 visitChildNode(node.interfaces, "interfaces"); | 153 visitChildNode(node.interfaces, "interfaces"); |
| 154 visitChildNode(node.typeParameters, "typeParameters"); | 154 visitChildNode(node.typeParameters, "typeParameters"); |
| 155 visitChildNode(node.defaultClause, "defaultClause"); | |
| 156 closeNode(); | 155 closeNode(); |
| 157 } | 156 } |
| 158 | 157 |
| 159 visitConditional(Conditional node) { | 158 visitConditional(Conditional node) { |
| 160 visitNodeWithChildren(node, "Conditional"); | 159 visitNodeWithChildren(node, "Conditional"); |
| 161 } | 160 } |
| 162 | 161 |
| 163 visitContinueStatement(ContinueStatement node) { | 162 visitContinueStatement(ContinueStatement node) { |
| 164 visitNodeWithChildren(node, "ContinueStatement"); | 163 visitNodeWithChildren(node, "ContinueStatement"); |
| 165 } | 164 } |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 } | 474 } |
| 476 | 475 |
| 477 visitStringNode(StringNode node) { | 476 visitStringNode(StringNode node) { |
| 478 unimplemented('visitNode', node: node); | 477 unimplemented('visitNode', node: node); |
| 479 } | 478 } |
| 480 | 479 |
| 481 unimplemented(String message, {Node node}) { | 480 unimplemented(String message, {Node node}) { |
| 482 throw message; | 481 throw message; |
| 483 } | 482 } |
| 484 } | 483 } |
| OLD | NEW |