| 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 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/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 4637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4648 */ | 4648 */ |
| 4649 void _addShownNames(ImportDirective importDirective) { | 4649 void _addShownNames(ImportDirective importDirective) { |
| 4650 if (importDirective.combinators == null) { | 4650 if (importDirective.combinators == null) { |
| 4651 return; | 4651 return; |
| 4652 } | 4652 } |
| 4653 List<SimpleIdentifier> identifiers = new List<SimpleIdentifier>(); | 4653 List<SimpleIdentifier> identifiers = new List<SimpleIdentifier>(); |
| 4654 _unusedShownNamesMap[importDirective] = identifiers; | 4654 _unusedShownNamesMap[importDirective] = identifiers; |
| 4655 for (Combinator combinator in importDirective.combinators) { | 4655 for (Combinator combinator in importDirective.combinators) { |
| 4656 if (combinator is ShowCombinator) { | 4656 if (combinator is ShowCombinator) { |
| 4657 for (SimpleIdentifier name in combinator.shownNames) { | 4657 for (SimpleIdentifier name in combinator.shownNames) { |
| 4658 identifiers.add(name); | 4658 if (name.staticElement != null) { |
| 4659 identifiers.add(name); |
| 4660 } |
| 4659 } | 4661 } |
| 4660 } | 4662 } |
| 4661 } | 4663 } |
| 4662 } | 4664 } |
| 4663 | 4665 |
| 4664 /** | 4666 /** |
| 4665 * Lookup and return the [Namespace] from the [_namespaceMap]. | 4667 * Lookup and return the [Namespace] from the [_namespaceMap]. |
| 4666 * | 4668 * |
| 4667 * If the map does not have the computed namespace, compute it and cache it in
the map. If | 4669 * If the map does not have the computed namespace, compute it and cache it in
the map. If |
| 4668 * [importDirective] is not resolved or is not resolvable, `null` is returned. | 4670 * [importDirective] is not resolved or is not resolvable, `null` is returned. |
| (...skipping 6420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11089 return null; | 11091 return null; |
| 11090 } | 11092 } |
| 11091 if (identical(node.staticElement, variable)) { | 11093 if (identical(node.staticElement, variable)) { |
| 11092 if (node.inSetterContext()) { | 11094 if (node.inSetterContext()) { |
| 11093 result = true; | 11095 result = true; |
| 11094 } | 11096 } |
| 11095 } | 11097 } |
| 11096 return null; | 11098 return null; |
| 11097 } | 11099 } |
| 11098 } | 11100 } |
| OLD | NEW |