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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 | 256 |
257 visitLiteralNull(LiteralNull node) { | 257 visitLiteralNull(LiteralNull node) { |
258 printLiteral(node, "LiteralNull"); | 258 printLiteral(node, "LiteralNull"); |
259 } | 259 } |
260 | 260 |
261 visitLiteralString(LiteralString node) { | 261 visitLiteralString(LiteralString node) { |
262 openAndCloseNode(node, "LiteralString", | 262 openAndCloseNode(node, "LiteralString", |
263 {"value" : node.token.slowToString()}); | 263 {"value" : node.token.slowToString()}); |
264 } | 264 } |
265 | 265 |
| 266 visitMixinApplication(MixinApplication node) { |
| 267 visitNodeWithChildren(node, "MixinApplication"); |
| 268 } |
| 269 |
266 visitModifiers(Modifiers node) { | 270 visitModifiers(Modifiers node) { |
267 visitNodeWithChildren(node, "Modifiers"); | 271 visitNodeWithChildren(node, "Modifiers"); |
268 } | 272 } |
269 | 273 |
270 visitNamedArgument(NamedArgument node) { | 274 visitNamedArgument(NamedArgument node) { |
271 visitNodeWithChildren(node, "NamedArgument"); | 275 visitNodeWithChildren(node, "NamedArgument"); |
272 } | 276 } |
273 | 277 |
| 278 visitNamedMixinApplication(NamedMixinApplication node) { |
| 279 visitNodeWithChildren(node, "NamedMixinApplication"); |
| 280 } |
| 281 |
274 visitNewExpression(NewExpression node) { | 282 visitNewExpression(NewExpression node) { |
275 visitNodeWithChildren(node, "NewExpression"); | 283 visitNodeWithChildren(node, "NewExpression"); |
276 } | 284 } |
277 | 285 |
278 visitNodeList(NodeList node) { | 286 visitNodeList(NodeList node) { |
279 var params = { | 287 var params = { |
280 "delimiter" : | 288 "delimiter" : |
281 node.delimiter != null ? node.delimiter.stringValue : null | 289 node.delimiter != null ? node.delimiter.stringValue : null |
282 }; | 290 }; |
283 if (node.nodes.toList().length == 0) { | 291 if (node.nodes.toList().length == 0) { |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 } | 471 } |
464 | 472 |
465 visitStringNode(StringNode node) { | 473 visitStringNode(StringNode node) { |
466 unimplemented('visitNode', node: node); | 474 unimplemented('visitNode', node: node); |
467 } | 475 } |
468 | 476 |
469 unimplemented(String message, {Node node}) { | 477 unimplemented(String message, {Node node}) { |
470 throw message; | 478 throw message; |
471 } | 479 } |
472 } | 480 } |
OLD | NEW |