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

Side by Side Diff: pkg/dev_compiler/lib/src/compiler/js_metalet.dart

Issue 2628053002: Fixes #28338 (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | tests/language_strong/await_in_cascade_test.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 // TODO(jmesserly): import from its own package 5 // TODO(jmesserly): import from its own package
6 import '../js_ast/js_ast.dart'; 6 import '../js_ast/js_ast.dart';
7 import '../js_ast/precedence.dart'; 7 import '../js_ast/precedence.dart';
8 8
9 import 'js_names.dart' show TemporaryId; 9 import 'js_names.dart' show TemporaryId;
10 10
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 visitFunctionExpression(FunctionExpression node) { 343 visitFunctionExpression(FunctionExpression node) {
344 var savedNested = _nestedFunction; 344 var savedNested = _nestedFunction;
345 _nestedFunction = true; 345 _nestedFunction = true;
346 super.visitFunctionExpression(node); 346 super.visitFunctionExpression(node);
347 _nestedFunction = savedNested; 347 _nestedFunction = savedNested;
348 } 348 }
349 349
350 @override 350 @override
351 visitYield(Yield node) { 351 visitYield(Yield node) {
352 if (!_nestedFunction) hasYield = true; 352 if (!_nestedFunction) hasYield = true;
353 super.visitYield(node);
353 } 354 }
354 355
355 @override 356 @override
356 visitNode(Node node) { 357 visitNode(Node node) {
357 if (hasYield && hasThis) return; // found both, nothing more to do. 358 if (hasYield && hasThis) return; // found both, nothing more to do.
358 super.visitNode(node); 359 super.visitNode(node);
359 } 360 }
360 } 361 }
OLDNEW
« no previous file with comments | « no previous file | tests/language_strong/await_in_cascade_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698