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

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

Issue 951463005: Small improvements for indexing NameElements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/store/codec.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.index; 5 library services.index;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/src/generated/ast.dart'; 9 import 'package:analyzer/src/generated/ast.dart';
10 import 'package:analyzer/src/generated/element.dart'; 10 import 'package:analyzer/src/generated/element.dart';
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 LocationWithData(Location location, this.data) 292 LocationWithData(Location location, this.data)
293 : super(location.element, location.offset, location.length); 293 : super(location.element, location.offset, location.length);
294 } 294 }
295 295
296 296
297 /** 297 /**
298 * An [Element] which is used to index references to the name without specifying 298 * An [Element] which is used to index references to the name without specifying
299 * a concrete kind of this name - field, method or something else. 299 * a concrete kind of this name - field, method or something else.
300 */ 300 */
301 class NameElement extends ElementImpl { 301 class NameElement extends ElementImpl {
302 NameElement(String name) : super("name:${name}", -1); 302 NameElement(String name) : super(name, -1);
303 303
304 @override 304 @override
305 ElementKind get kind => ElementKind.NAME; 305 ElementKind get kind => ElementKind.NAME;
306 306
307 @override 307 @override
308 accept(ElementVisitor visitor) => null; 308 accept(ElementVisitor visitor) => null;
309 } 309 }
310 310
311 311
312 /** 312 /**
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 static final UniverseElement INSTANCE = new UniverseElement._(); 367 static final UniverseElement INSTANCE = new UniverseElement._();
368 368
369 UniverseElement._() : super("--universe--", -1); 369 UniverseElement._() : super("--universe--", -1);
370 370
371 @override 371 @override
372 ElementKind get kind => ElementKind.UNIVERSE; 372 ElementKind get kind => ElementKind.UNIVERSE;
373 373
374 @override 374 @override
375 accept(ElementVisitor visitor) => null; 375 accept(ElementVisitor visitor) => null;
376 } 376 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/store/codec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698