| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 } | 296 } |
| 297 | 297 |
| 298 visitOperator(Operator node) { | 298 visitOperator(Operator node) { |
| 299 openAndCloseNode(node, "Operator", {"value" : node.token}); | 299 openAndCloseNode(node, "Operator", {"value" : node.token}); |
| 300 } | 300 } |
| 301 | 301 |
| 302 visitParenthesizedExpression(ParenthesizedExpression node) { | 302 visitParenthesizedExpression(ParenthesizedExpression node) { |
| 303 visitNodeWithChildren(node, "ParenthesizedExpression"); | 303 visitNodeWithChildren(node, "ParenthesizedExpression"); |
| 304 } | 304 } |
| 305 | 305 |
| 306 visitRedirectingFactoryBody(RedirectingFactoryBody node) { |
| 307 openNode(node, "RedirectingFactoryBody"); |
| 308 visitChildNode(node.constructorReference, "constructorReference"); |
| 309 closeNode(); |
| 310 } |
| 311 |
| 306 visitRethrow(Rethrow node) { | 312 visitRethrow(Rethrow node) { |
| 307 visitNodeWithChildren(node, "Rethrow"); | 313 visitNodeWithChildren(node, "Rethrow"); |
| 308 } | 314 } |
| 309 | 315 |
| 310 visitReturn(Return node) { | 316 visitReturn(Return node) { |
| 311 openNode(node, "Return"); | 317 openNode(node, "Return"); |
| 312 visitChildNode(node.expression, "expression"); | 318 visitChildNode(node.expression, "expression"); |
| 313 closeNode(); | 319 closeNode(); |
| 314 } | 320 } |
| 315 | 321 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 } | 507 } |
| 502 | 508 |
| 503 visitGotoStatement(GotoStatement node) { | 509 visitGotoStatement(GotoStatement node) { |
| 504 unimplemented('visitNode', node: node); | 510 unimplemented('visitNode', node: node); |
| 505 } | 511 } |
| 506 | 512 |
| 507 unimplemented(String message, {Node node}) { | 513 unimplemented(String message, {Node node}) { |
| 508 throw message; | 514 throw message; |
| 509 } | 515 } |
| 510 } | 516 } |
| OLD | NEW |