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

Side by Side Diff: pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.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
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.SyncForIn( 778 return new tree.ForIn(
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,
782 forToken, 783 forToken,
783 inToken); 784 inToken);
784 } else if (stmt is FunctionDeclaration) { 785 } else if (stmt is FunctionDeclaration) {
785 tree.FunctionExpression function = new tree.FunctionExpression( 786 tree.FunctionExpression function = new tree.FunctionExpression(
786 stmt.name != null ? makeIdentifier(stmt.name) : null, 787 stmt.name != null ? makeIdentifier(stmt.name) : null,
787 makeParameters(stmt.parameters), 788 makeParameters(stmt.parameters),
788 makeFunctionBody(stmt.body), 789 makeFunctionBody(stmt.body),
789 stmt.returnType != null ? makeType(stmt.returnType) : null, 790 stmt.returnType != null ? makeType(stmt.returnType) : null,
790 makeEmptyModifiers(), 791 makeEmptyModifiers(),
791 null, // initializers 792 null, // initializers
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 printStringChunk(chunk.previous), 1333 printStringChunk(chunk.previous),
1333 node); 1334 node);
1334 } else { 1335 } else {
1335 return node; 1336 return node;
1336 } 1337 }
1337 } 1338 }
1338 return printStringChunk(output.chunk); 1339 return printStringChunk(output.chunk);
1339 } 1340 }
1340 1341
1341 } 1342 }
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