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

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

Issue 201613006: Introduces the new syntax for deferred loading (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 String unparse(Node node) { 7 String unparse(Node node) {
8 Unparser unparser = new Unparser(); 8 Unparser unparser = new Unparser();
9 unparser.unparse(node); 9 unparser.unparse(node);
10 return unparser.result; 10 return unparser.result;
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 530
531 visitLibraryName(LibraryName node) { 531 visitLibraryName(LibraryName node) {
532 addToken(node.libraryKeyword); 532 addToken(node.libraryKeyword);
533 node.visitChildren(this); 533 node.visitChildren(this);
534 add(node.getEndToken().value); 534 add(node.getEndToken().value);
535 } 535 }
536 536
537 visitImport(Import node) { 537 visitImport(Import node) {
538 addToken(node.importKeyword); 538 addToken(node.importKeyword);
539 visit(node.uri); 539 visit(node.uri);
540 if (node.isDeferred) {
541 sb.write(' deferred');
542 }
540 if (node.prefix != null) { 543 if (node.prefix != null) {
541 sb.write(' '); 544 sb.write(' as ');
542 addToken(node.asKeyword);
543 visit(node.prefix); 545 visit(node.prefix);
544 } 546 }
545 if (node.combinators != null) { 547 if (node.combinators != null) {
546 sb.write(' '); 548 sb.write(' ');
547 visit(node.combinators); 549 visit(node.combinators);
548 } 550 }
549 add(node.getEndToken().value); 551 add(node.getEndToken().value);
550 } 552 }
551 553
552 visitExport(Export node) { 554 visitExport(Export node) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 } 617 }
616 618
617 visitStatement(Statement node) { 619 visitStatement(Statement node) {
618 throw 'internal error'; // Should not be called. 620 throw 'internal error'; // Should not be called.
619 } 621 }
620 622
621 visitStringNode(StringNode node) { 623 visitStringNode(StringNode node) {
622 throw 'internal error'; // Should not be called. 624 throw 'internal error'; // Should not be called.
623 } 625 }
624 } 626 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/tree/prettyprint.dart ('k') | sdk/lib/_internal/lib/async_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698