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

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

Issue 685493003: Index EnumDeclaration definitions as top-level elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | « no previous file | pkg/analysis_server/test/abstract_context.dart » ('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 library services.src.index.index_contributor; 5 library services.src.index.index_contributor;
6 6
7 import 'dart:collection' show Queue; 7 import 'dart:collection' show Queue;
8 8
9 import 'package:analysis_server/src/services/correction/namespace.dart'; 9 import 'package:analysis_server/src/services/correction/namespace.dart';
10 import 'package:analysis_server/src/services/index/index.dart'; 10 import 'package:analysis_server/src/services/index/index.dart';
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 } 414 }
415 } 415 }
416 } 416 }
417 return super.visitClassDeclaration(node); 417 return super.visitClassDeclaration(node);
418 } finally { 418 } finally {
419 _exitScope(); 419 _exitScope();
420 } 420 }
421 } 421 }
422 422
423 @override 423 @override
424 Object visitEnumDeclaration(EnumDeclaration node) {
425 ClassElement element = node.element;
426 enterScope(element);
427 try {
428 _recordElementDefinition(element);
429 return super.visitEnumDeclaration(node);
430 } finally {
431 _exitScope();
432 }
433 }
434
435 @override
424 Object visitClassTypeAlias(ClassTypeAlias node) { 436 Object visitClassTypeAlias(ClassTypeAlias node) {
425 ClassElement element = node.element; 437 ClassElement element = node.element;
426 enterScope(element); 438 enterScope(element);
427 try { 439 try {
428 _recordElementDefinition(element); 440 _recordElementDefinition(element);
429 { 441 {
430 TypeName superclassNode = node.superclass; 442 TypeName superclassNode = node.superclass;
431 if (superclassNode != null) { 443 if (superclassNode != null) {
432 _recordSuperType(superclassNode, IndexConstants.IS_EXTENDED_BY); 444 _recordSuperType(superclassNode, IndexConstants.IS_EXTENDED_BY);
433 } 445 }
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 } 1046 }
1035 1047
1036 /** 1048 /**
1037 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node ". 1049 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node ".
1038 */ 1050 */
1039 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) { 1051 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) {
1040 AstNode parent = node.parent; 1052 AstNode parent = node.parent;
1041 return parent is PrefixedIdentifier && parent.identifier == node; 1053 return parent is PrefixedIdentifier && parent.identifier == node;
1042 } 1054 }
1043 } 1055 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/abstract_context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698