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

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

Issue 20994004: Remove support for script tags. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 visitRethrow(Rethrow node) { 307 visitRethrow(Rethrow node) {
308 visitNodeWithChildren(node, "Rethrow"); 308 visitNodeWithChildren(node, "Rethrow");
309 } 309 }
310 310
311 visitReturn(Return node) { 311 visitReturn(Return node) {
312 openNode(node, "Return"); 312 openNode(node, "Return");
313 visitChildNode(node.expression, "expression"); 313 visitChildNode(node.expression, "expression");
314 closeNode(); 314 closeNode();
315 } 315 }
316 316
317 visitScriptTag(ScriptTag node) {
318 visitNodeWithChildren(node, "ScriptTag");
319 }
320
321 visitChildNode(Node node, String fieldName) { 317 visitChildNode(Node node, String fieldName) {
322 if (node == null) return; 318 if (node == null) return;
323 addCurrentIndent(); 319 addCurrentIndent();
324 sb.write("<$fieldName>\n"); 320 sb.write("<$fieldName>\n");
325 pushTag(fieldName); 321 pushTag(fieldName);
326 node.accept(this); 322 node.accept(this);
327 popTag(); 323 popTag();
328 addCurrentIndent(); 324 addCurrentIndent();
329 sb.write("</$fieldName>\n"); 325 sb.write("</$fieldName>\n");
330 } 326 }
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 } 470 }
475 471
476 visitStringNode(StringNode node) { 472 visitStringNode(StringNode node) {
477 unimplemented('visitNode', node: node); 473 unimplemented('visitNode', node: node);
478 } 474 }
479 475
480 unimplemented(String message, {Node node}) { 476 unimplemented(String message, {Node node}) {
481 throw message; 477 throw message;
482 } 478 }
483 } 479 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698