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 engine.resolver; | 5 library engine.resolver; |
6 | 6 |
7 import "dart:math" as math; | 7 import "dart:math" as math; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 | 9 |
10 import 'package:analyzer/src/generated/utilities_collection.dart'; | 10 import 'package:analyzer/src/generated/utilities_collection.dart'; |
(...skipping 14825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14836 ExecutableElement outerFunction = _enclosingFunction; | 14836 ExecutableElement outerFunction = _enclosingFunction; |
14837 try { | 14837 try { |
14838 _enclosingFunction = node.element; | 14838 _enclosingFunction = node.element; |
14839 return super.visitFunctionDeclaration(node); | 14839 return super.visitFunctionDeclaration(node); |
14840 } finally { | 14840 } finally { |
14841 _enclosingFunction = outerFunction; | 14841 _enclosingFunction = outerFunction; |
14842 } | 14842 } |
14843 } | 14843 } |
14844 | 14844 |
14845 @override | 14845 @override |
| 14846 Object visitMethodDeclaration(MethodDeclaration node) { |
| 14847 ExecutableElement outerFunction = _enclosingFunction; |
| 14848 try { |
| 14849 _enclosingFunction = node.element; |
| 14850 return super.visitMethodDeclaration(node); |
| 14851 } finally { |
| 14852 _enclosingFunction = outerFunction; |
| 14853 } |
| 14854 } |
| 14855 |
| 14856 @override |
14846 Object visitFunctionExpression(FunctionExpression node) { | 14857 Object visitFunctionExpression(FunctionExpression node) { |
14847 if (node.parent is! FunctionDeclaration) { | 14858 if (node.parent is! FunctionDeclaration) { |
14848 ExecutableElement outerFunction = _enclosingFunction; | 14859 ExecutableElement outerFunction = _enclosingFunction; |
14849 try { | 14860 try { |
14850 _enclosingFunction = node.element; | 14861 _enclosingFunction = node.element; |
14851 return super.visitFunctionExpression(node); | 14862 return super.visitFunctionExpression(node); |
14852 } finally { | 14863 } finally { |
14853 _enclosingFunction = outerFunction; | 14864 _enclosingFunction = outerFunction; |
14854 } | 14865 } |
14855 } else { | 14866 } else { |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15394 * library. | 15405 * library. |
15395 */ | 15406 */ |
15396 final HashSet<String> members = new HashSet<String>(); | 15407 final HashSet<String> members = new HashSet<String>(); |
15397 | 15408 |
15398 /** | 15409 /** |
15399 * Names of resolved or unresolved class members that are read in the | 15410 * Names of resolved or unresolved class members that are read in the |
15400 * library. | 15411 * library. |
15401 */ | 15412 */ |
15402 final HashSet<String> readMembers = new HashSet<String>(); | 15413 final HashSet<String> readMembers = new HashSet<String>(); |
15403 } | 15414 } |
OLD | NEW |