Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/tree/prettyprint.dart

Issue 422483002: Mix in [TreeElementMixin] only on nodes that need it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/tree/nodes.dart ('k') | sdk/lib/_internal/compiler/implementation/tree/tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698