| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 } | 183 } |
| 184 | 184 |
| 185 visitExpressionStatement(ExpressionStatement node) { | 185 visitExpressionStatement(ExpressionStatement node) { |
| 186 visitNodeWithChildren(node, "ExpressionStatement"); | 186 visitNodeWithChildren(node, "ExpressionStatement"); |
| 187 } | 187 } |
| 188 | 188 |
| 189 visitFor(For node) { | 189 visitFor(For node) { |
| 190 visitNodeWithChildren(node, "For"); | 190 visitNodeWithChildren(node, "For"); |
| 191 } | 191 } |
| 192 | 192 |
| 193 visitForIn(ForIn node) { | 193 visitAsyncForIn(AsyncForIn node) { |
| 194 openNode(node, "ForIn", {'await': node.awaitToken}); | 194 openNode(node, "AsyncForIn"); |
| 195 } |
| 196 |
| 197 visitSyncForIn(SyncForIn node) { |
| 198 openNode(node, "ForIn"); |
| 195 node.visitChildren(this); | 199 node.visitChildren(this); |
| 196 closeNode(); | 200 closeNode(); |
| 197 } | 201 } |
| 198 | 202 |
| 199 visitFunctionDeclaration(FunctionDeclaration node) { | 203 visitFunctionDeclaration(FunctionDeclaration node) { |
| 200 visitNodeWithChildren(node, "FunctionDeclaration"); | 204 visitNodeWithChildren(node, "FunctionDeclaration"); |
| 201 } | 205 } |
| 202 | 206 |
| 203 visitFunctionExpression(FunctionExpression node) { | 207 visitFunctionExpression(FunctionExpression node) { |
| 204 openNode(node, "FunctionExpression", { | 208 openNode(node, "FunctionExpression", { |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 } | 532 } |
| 529 | 533 |
| 530 visitGotoStatement(GotoStatement node) { | 534 visitGotoStatement(GotoStatement node) { |
| 531 unimplemented('visitNode', node: node); | 535 unimplemented('visitNode', node: node); |
| 532 } | 536 } |
| 533 | 537 |
| 534 unimplemented(String message, {Node node}) { | 538 unimplemented(String message, {Node node}) { |
| 535 throw message; | 539 throw message; |
| 536 } | 540 } |
| 537 } | 541 } |
| OLD | NEW |