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

Side by Side Diff: pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library dart_tree_printer; 5 library dart_tree_printer;
6 6
7 import '../constants/values.dart' as values; 7 import '../constants/values.dart' as values;
8 import '../dart_types.dart' as types; 8 import '../dart_types.dart' as types;
9 import '../dart2jslib.dart' as dart2js; 9 import '../dart2jslib.dart' as dart2js;
10 import '../elements/elements.dart' as elements; 10 import '../elements/elements.dart' as elements;
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 makeList(',', stmt.updates.map(makeExpression)), 768 makeList(',', stmt.updates.map(makeExpression)),
769 makeStatement(stmt.body, shortIf: shortIf), 769 makeStatement(stmt.body, shortIf: shortIf),
770 forToken); 770 forToken);
771 } else if (stmt is ForIn) { 771 } else if (stmt is ForIn) {
772 tree.Node left; 772 tree.Node left;
773 if (stmt.leftHandValue is Identifier) { 773 if (stmt.leftHandValue is Identifier) {
774 left = makeExpression(stmt.leftHandValue); 774 left = makeExpression(stmt.leftHandValue);
775 } else { 775 } else {
776 left = makeVariableDeclarations(stmt.leftHandValue); 776 left = makeVariableDeclarations(stmt.leftHandValue);
777 } 777 }
778 return new tree.ForIn( 778 return new tree.SyncForIn(
779 left, 779 left,
780 makeExpression(stmt.expression), 780 makeExpression(stmt.expression),
781 makeStatement(stmt.body, shortIf: shortIf), 781 makeStatement(stmt.body, shortIf: shortIf),
782 awaitToken,
783 forToken, 782 forToken,
784 inToken); 783 inToken);
785 } else if (stmt is FunctionDeclaration) { 784 } else if (stmt is FunctionDeclaration) {
786 tree.FunctionExpression function = new tree.FunctionExpression( 785 tree.FunctionExpression function = new tree.FunctionExpression(
787 stmt.name != null ? makeIdentifier(stmt.name) : null, 786 stmt.name != null ? makeIdentifier(stmt.name) : null,
788 makeParameters(stmt.parameters), 787 makeParameters(stmt.parameters),
789 makeFunctionBody(stmt.body), 788 makeFunctionBody(stmt.body),
790 stmt.returnType != null ? makeType(stmt.returnType) : null, 789 stmt.returnType != null ? makeType(stmt.returnType) : null,
791 makeEmptyModifiers(), 790 makeEmptyModifiers(),
792 null, // initializers 791 null, // initializers
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 printStringChunk(chunk.previous), 1332 printStringChunk(chunk.previous),
1334 node); 1333 node);
1335 } else { 1334 } else {
1336 return node; 1335 return node;
1337 } 1336 }
1338 } 1337 }
1339 return printStringChunk(output.chunk); 1338 return printStringChunk(output.chunk);
1340 } 1339 }
1341 1340
1342 } 1341 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart ('k') | pkg/compiler/lib/src/inferrer/inferrer_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698