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

Side by Side Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1692533004: Mark FunctionExpression elements as used in DeclarationResolver. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | pkg/analyzer/test/generated/declaration_resolver_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) 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 analyzer.src.generated.resolver; 5 library analyzer.src.generated.resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/visitor.dart'; 10 import 'package:analyzer/dart/ast/visitor.dart';
(...skipping 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after
2295 } finally { 2295 } finally {
2296 _enclosingExecutable = outerExecutable; 2296 _enclosingExecutable = outerExecutable;
2297 } 2297 }
2298 } 2298 }
2299 2299
2300 @override 2300 @override
2301 Object visitFunctionExpression(FunctionExpression node) { 2301 Object visitFunctionExpression(FunctionExpression node) {
2302 if (node.parent is! FunctionDeclaration) { 2302 if (node.parent is! FunctionDeclaration) {
2303 FunctionElement element = _findAtOffset( 2303 FunctionElement element = _findAtOffset(
2304 _enclosingExecutable.functions, node, node.beginToken.offset); 2304 _enclosingExecutable.functions, node, node.beginToken.offset);
2305 _expectedElements.remove(element);
2305 node.element = element; 2306 node.element = element;
2306 } 2307 }
2307 ExecutableElement outerExecutable = _enclosingExecutable; 2308 ExecutableElement outerExecutable = _enclosingExecutable;
2308 try { 2309 try {
2309 _enclosingExecutable = node.element; 2310 _enclosingExecutable = node.element;
2310 return super.visitFunctionExpression(node); 2311 return super.visitFunctionExpression(node);
2311 } finally { 2312 } finally {
2312 _enclosingExecutable = outerExecutable; 2313 _enclosingExecutable = outerExecutable;
2313 } 2314 }
2314 } 2315 }
(...skipping 10417 matching lines...) Expand 10 before | Expand all | Expand 10 after
12732 nonFields.add(node); 12733 nonFields.add(node);
12733 return null; 12734 return null;
12734 } 12735 }
12735 12736
12736 @override 12737 @override
12737 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); 12738 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this);
12738 12739
12739 @override 12740 @override
12740 Object visitWithClause(WithClause node) => null; 12741 Object visitWithClause(WithClause node) => null;
12741 } 12742 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/declaration_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698