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

Side by Side Diff: pkg/analysis_services/lib/src/index/index_contributor.dart

Issue 390103003: Remove variable reference in combinator workaround. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/pubspec.yaml ('k') | pkg/analysis_services/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) 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library services.src.index.index_contributor; 8 library services.src.index.index_contributor;
9 9
10 import 'dart:collection' show Queue; 10 import 'dart:collection' show Queue;
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 // name in declaration 661 // name in declaration
662 if (node.inDeclarationContext()) { 662 if (node.inDeclarationContext()) {
663 recordRelationship( 663 recordRelationship(
664 nameElement, 664 nameElement,
665 IndexConstants.NAME_IS_DEFINED_BY, 665 IndexConstants.NAME_IS_DEFINED_BY,
666 location); 666 location);
667 return null; 667 return null;
668 } 668 }
669 // prepare information 669 // prepare information
670 Element element = node.bestElement; 670 Element element = node.bestElement;
671 // TODO(scheglov) fix resolver to resolve to Field, not an accessor
672 if (node.parent is Combinator && element is PropertyAccessorElement) {
673 element = (element as PropertyAccessorElement).variable;
674 }
675 // stop if already handled 671 // stop if already handled
676 if (_isAlreadyHandledName(node)) { 672 if (_isAlreadyHandledName(node)) {
677 return null; 673 return null;
678 } 674 }
679 // record name read/write 675 // record name read/write
680 if (element != null && element.enclosingElement is ClassElement || 676 if (element != null && element.enclosingElement is ClassElement ||
681 element == null && location.isQualified) { 677 element == null && location.isQualified) {
682 bool inGetterContext = node.inGetterContext(); 678 bool inGetterContext = node.inGetterContext();
683 bool inSetterContext = node.inSetterContext(); 679 bool inSetterContext = node.inSetterContext();
684 if (inGetterContext && inSetterContext) { 680 if (inGetterContext && inSetterContext) {
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 } 1166 }
1171 1167
1172 /** 1168 /**
1173 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node ". 1169 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node ".
1174 */ 1170 */
1175 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) { 1171 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) {
1176 AstNode parent = node.parent; 1172 AstNode parent = node.parent;
1177 return parent is PrefixedIdentifier && identical(parent.identifier, node); 1173 return parent is PrefixedIdentifier && identical(parent.identifier, node);
1178 } 1174 }
1179 } 1175 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/pubspec.yaml ('k') | pkg/analysis_services/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698