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

Side by Side Diff: lib/src/checker/checker.dart

Issue 1248213002: allow await to be any value, fixes part of #264 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 5 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 | pubspec.yaml » ('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 library dev_compiler.src.checker.checker; 5 library dev_compiler.src.checker.checker;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/src/generated/ast.dart'; 8 import 'package:analyzer/src/generated/ast.dart';
9 import 'package:analyzer/src/generated/element.dart'; 9 import 'package:analyzer/src/generated/element.dart';
10 import 'package:analyzer/src/generated/scanner.dart' show Token, TokenType; 10 import 'package:analyzer/src/generated/scanner.dart' show Token, TokenType;
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 node.visitChildren(this); 663 node.visitChildren(this);
664 } 664 }
665 665
666 @override 666 @override
667 void visitYieldStatement(YieldStatement node) { 667 void visitYieldStatement(YieldStatement node) {
668 _checkReturnOrYield(node.expression, node, node.star != null); 668 _checkReturnOrYield(node.expression, node, node.star != null);
669 node.visitChildren(this); 669 node.visitChildren(this);
670 } 670 }
671 671
672 @override 672 @override
673 void visitAwaitExpression(AwaitExpression node) {
674 checkAssignment(node.expression, rules.provider.futureDynamicType);
675 node.visitChildren(this);
676 }
677
678 @override
679 void visitPropertyAccess(PropertyAccess node) { 673 void visitPropertyAccess(PropertyAccess node) {
680 var target = node.realTarget; 674 var target = node.realTarget;
681 if (rules.isDynamicTarget(target)) { 675 if (rules.isDynamicTarget(target)) {
682 _recordDynamicInvoke(node, target); 676 _recordDynamicInvoke(node, target);
683 } 677 }
684 node.visitChildren(this); 678 node.visitChildren(this);
685 } 679 }
686 680
687 @override 681 @override
688 void visitPrefixedIdentifier(PrefixedIdentifier node) { 682 void visitPrefixedIdentifier(PrefixedIdentifier node) {
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 if (info is CoercionInfo) { 997 if (info is CoercionInfo) {
1004 // TODO(jmesserly): if we're run again on the same AST, we'll produce the 998 // TODO(jmesserly): if we're run again on the same AST, we'll produce the
1005 // same annotations. This should be harmless. This might go away once 999 // same annotations. This should be harmless. This might go away once
1006 // CodeChecker is integrated better with analyzer, as it will know that 1000 // CodeChecker is integrated better with analyzer, as it will know that
1007 // checking has already been performed. 1001 // checking has already been performed.
1008 // assert(CoercionInfo.get(info.node) == null); 1002 // assert(CoercionInfo.get(info.node) == null);
1009 CoercionInfo.set(info.node, info); 1003 CoercionInfo.set(info.node, info);
1010 } 1004 }
1011 } 1005 }
1012 } 1006 }
OLDNEW
« no previous file with comments | « no previous file | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698