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

Unified Diff: pkg/analyzer/lib/src/generated/index.dart

Issue 360393003: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/index.dart
diff --git a/pkg/analyzer/lib/src/generated/index.dart b/pkg/analyzer/lib/src/generated/index.dart
index 92ed3883e7c2c9f61c577e22079d19d080ab5a1d..08b2c67fb2a7a983a353f7db328ac294486bc003 100644
--- a/pkg/analyzer/lib/src/generated/index.dart
+++ b/pkg/analyzer/lib/src/generated/index.dart
@@ -805,25 +805,6 @@ class IndexContributor extends GeneralizingAstVisitor<Object> {
return parent is PrefixedIdentifier && identical(parent.identifier, node);
}
- /**
- * @return `true` if given [SimpleIdentifier] is "name" part of prefixed identifier or
- * method invocation.
- */
- static bool _isQualified(SimpleIdentifier node) {
- AstNode parent = node.parent;
- if (parent is PrefixedIdentifier) {
- return identical(parent.identifier, node);
- }
- if (parent is PropertyAccess) {
- return identical(parent.propertyName, node);
- }
- if (parent is MethodInvocation) {
- MethodInvocation invocation = parent;
- return invocation.realTarget != null && identical(invocation.methodName, node);
- }
- return false;
- }
-
final IndexStore _store;
LibraryElement _libraryElement;
@@ -1178,7 +1159,7 @@ class IndexContributor extends GeneralizingAstVisitor<Object> {
_recordImportElementReferenceWithPrefix(node);
} else if (element is PropertyAccessorElement || element is MethodElement) {
location = _getLocationWithTypeAssignedToField(node, element, location);
- if (_isQualified(node)) {
+ if (node.isQualified) {
recordRelationship(element, IndexConstants.IS_REFERENCED_BY_QUALIFIED, location);
} else {
recordRelationship(element, IndexConstants.IS_REFERENCED_BY_UNQUALIFIED, location);
@@ -1417,7 +1398,7 @@ class IndexContributor extends GeneralizingAstVisitor<Object> {
* or method invocation.
*/
void _recordQualifiedMemberReference(SimpleIdentifier node, Element element, Element nameElement, Location location) {
- if (_isQualified(node)) {
+ if (node.isQualified) {
Relationship relationship = element != null ? IndexConstants.IS_REFERENCED_BY_QUALIFIED_RESOLVED : IndexConstants.IS_REFERENCED_BY_QUALIFIED_UNRESOLVED;
recordRelationship(nameElement, relationship, location);
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698