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

Side by Side Diff: pkg/compiler/lib/src/tree/unparser.dart

Issue 1077093002: Revert "Model 'await for' as an explicit node in tree and fix its handling." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
« no previous file with comments | « pkg/compiler/lib/src/tree/prettyprint.dart ('k') | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, {minify: true}) { 7 String unparse(Node node, {minify: true}) {
8 Unparser unparser = new Unparser(minify: minify); 8 Unparser unparser = new Unparser(minify: minify);
9 unparser.unparse(node); 9 unparser.unparse(node);
10 return unparser.result; 10 return unparser.result;
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 } 616 }
617 617
618 visitBreakStatement(BreakStatement node) { 618 visitBreakStatement(BreakStatement node) {
619 visitGotoStatement(node); 619 visitGotoStatement(node);
620 } 620 }
621 621
622 visitContinueStatement(ContinueStatement node) { 622 visitContinueStatement(ContinueStatement node) {
623 visitGotoStatement(node); 623 visitGotoStatement(node);
624 } 624 }
625 625
626 visitAsyncForIn(AsyncForIn node) { 626 visitForIn(ForIn node) {
627 write(node.awaitToken.value); 627 if (node.awaitToken != null) {
628 write(' '); 628 write(node.awaitToken.value);
629 write(' ');
630 }
629 write(node.forToken.value); 631 write(node.forToken.value);
630 space(); 632 space();
631 write('('); 633 write('(');
632 visit(node.declaredIdentifier);
633 write(' ');
634 addToken(node.inToken);
635 visit(node.expression);
636 write(')');
637 space();
638 visit(node.body);
639 }
640
641
642 visitSyncForIn(SyncForIn node) {
643 write(node.forToken.value);
644 space();
645 write('(');
646 visit(node.declaredIdentifier); 634 visit(node.declaredIdentifier);
647 write(' '); 635 write(' ');
648 addToken(node.inToken); 636 addToken(node.inToken);
649 visit(node.expression); 637 visit(node.expression);
650 write(')'); 638 write(')');
651 space(); 639 space();
652 visit(node.body); 640 visit(node.body);
653 } 641 }
654 642
655 visitLabel(Label node) { 643 visitLabel(Label node) {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 } 840 }
853 841
854 visitStatement(Statement node) { 842 visitStatement(Statement node) {
855 throw 'internal error'; // Should not be called. 843 throw 'internal error'; // Should not be called.
856 } 844 }
857 845
858 visitStringNode(StringNode node) { 846 visitStringNode(StringNode node) {
859 throw 'internal error'; // Should not be called. 847 throw 'internal error'; // Should not be called.
860 } 848 }
861 } 849 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/tree/prettyprint.dart ('k') | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698