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

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

Issue 398093003: Fix for name declaration indexing in for-in statement. (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
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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 } else { 525 } else {
526 int start = node.type.end; 526 int start = node.type.end;
527 location = _createLocationForOffset(start, 0); 527 location = _createLocationForOffset(start, 0);
528 } 528 }
529 // record relationship 529 // record relationship
530 recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location); 530 recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location);
531 return super.visitConstructorName(node); 531 return super.visitConstructorName(node);
532 } 532 }
533 533
534 @override 534 @override
535 Object visitDeclaredIdentifier(DeclaredIdentifier node) {
536 LocalVariableElement element = node.element;
537 enterScope(element);
538 try {
539 return super.visitDeclaredIdentifier(node);
540 } finally {
541 _exitScope();
542 }
543 }
544
545 @override
535 Object visitExportDirective(ExportDirective node) { 546 Object visitExportDirective(ExportDirective node) {
536 ExportElement element = node.element; 547 ExportElement element = node.element;
537 if (element != null) { 548 if (element != null) {
538 LibraryElement expLibrary = element.exportedLibrary; 549 LibraryElement expLibrary = element.exportedLibrary;
539 _recordLibraryReference(node, expLibrary); 550 _recordLibraryReference(node, expLibrary);
540 } 551 }
541 return super.visitExportDirective(node); 552 return super.visitExportDirective(node);
542 } 553 }
543 554
544 @override 555 @override
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 } 1177 }
1167 1178
1168 /** 1179 /**
1169 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node ". 1180 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node ".
1170 */ 1181 */
1171 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) { 1182 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) {
1172 AstNode parent = node.parent; 1183 AstNode parent = node.parent;
1173 return parent is PrefixedIdentifier && identical(parent.identifier, node); 1184 return parent is PrefixedIdentifier && identical(parent.identifier, node);
1174 } 1185 }
1175 } 1186 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698