| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |