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

Side by Side Diff: pkg/analyzer/lib/src/dart/element/builder.dart

Issue 1764553002: Make SearchMatch usable for the new index - remove the element field. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « pkg/analysis_server/test/services/correction/status_test.dart ('k') | no next file » | 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 analyzer.src.dart.element.builder; 5 library analyzer.src.dart.element.builder;
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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 return super.visitImportDirective(node); 899 return super.visitImportDirective(node);
900 } 900 }
901 901
902 @override 902 @override
903 Object visitLabeledStatement(LabeledStatement node) { 903 Object visitLabeledStatement(LabeledStatement node) {
904 bool onSwitchStatement = node.statement is SwitchStatement; 904 bool onSwitchStatement = node.statement is SwitchStatement;
905 for (Label label in node.labels) { 905 for (Label label in node.labels) {
906 SimpleIdentifier labelName = label.label; 906 SimpleIdentifier labelName = label.label;
907 LabelElementImpl element = 907 LabelElementImpl element =
908 new LabelElementImpl.forNode(labelName, onSwitchStatement, false); 908 new LabelElementImpl.forNode(labelName, onSwitchStatement, false);
909 _setCodeRange(element, node);
910 _currentHolder.addLabel(element); 909 _currentHolder.addLabel(element);
911 labelName.staticElement = element; 910 labelName.staticElement = element;
912 } 911 }
913 return super.visitLabeledStatement(node); 912 return super.visitLabeledStatement(node);
914 } 913 }
915 914
916 @override 915 @override
917 Object visitLibraryDirective(LibraryDirective node) { 916 Object visitLibraryDirective(LibraryDirective node) {
918 _createElementAnnotations(node.metadata); 917 _createElementAnnotations(node.metadata);
919 return super.visitLibraryDirective(node); 918 return super.visitLibraryDirective(node);
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 return null; 1453 return null;
1455 } 1454 }
1456 1455
1457 /** 1456 /**
1458 * Return the lexical identifiers associated with the given [identifiers]. 1457 * Return the lexical identifiers associated with the given [identifiers].
1459 */ 1458 */
1460 static List<String> _getIdentifiers(NodeList<SimpleIdentifier> identifiers) { 1459 static List<String> _getIdentifiers(NodeList<SimpleIdentifier> identifiers) {
1461 return identifiers.map((identifier) => identifier.name).toList(); 1460 return identifiers.map((identifier) => identifier.name).toList();
1462 } 1461 }
1463 } 1462 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/correction/status_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698