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

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

Issue 1069983005: 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: fix failing assertion rebase 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 visitForIn(ForIn node) { 626 visitAsyncForIn(AsyncForIn node) {
627 if (node.awaitToken != null) { 627 write(node.awaitToken.value);
628 write(node.awaitToken.value); 628 write(' ');
629 write(' ');
630 }
631 write(node.forToken.value); 629 write(node.forToken.value);
632 space(); 630 space();
633 write('('); 631 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('(');
634 visit(node.declaredIdentifier); 646 visit(node.declaredIdentifier);
635 write(' '); 647 write(' ');
636 addToken(node.inToken); 648 addToken(node.inToken);
637 visit(node.expression); 649 visit(node.expression);
638 write(')'); 650 write(')');
639 space(); 651 space();
640 visit(node.body); 652 visit(node.body);
641 } 653 }
642 654
643 visitLabel(Label node) { 655 visitLabel(Label node) {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 } 852 }
841 853
842 visitStatement(Statement node) { 854 visitStatement(Statement node) {
843 throw 'internal error'; // Should not be called. 855 throw 'internal error'; // Should not be called.
844 } 856 }
845 857
846 visitStringNode(StringNode node) { 858 visitStringNode(StringNode node) {
847 throw 'internal error'; // Should not be called. 859 throw 'internal error'; // Should not be called.
848 } 860 }
849 } 861 }
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