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

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

Issue 1503203002: Additional clean-up after moving to the new task model; a breaking change needed to allow a bug to … (Closed) Base URL: https://github.com/dart-lang/sdk.git@analyzer-breaking-0.27
Patch Set: Created 5 years 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
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 engine.element; 5 library engine.element;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' show min; 8 import 'dart:math' show min;
9 9
10 import 'package:analyzer/src/generated/utilities_general.dart'; 10 import 'package:analyzer/src/generated/utilities_general.dart';
(...skipping 7775 matching lines...) Expand 10 before | Expand all | Expand 10 after
7786 7786
7787 /** 7787 /**
7788 * A local variable. 7788 * A local variable.
7789 */ 7789 */
7790 abstract class LocalVariableElement implements LocalElement, VariableElement { 7790 abstract class LocalVariableElement implements LocalElement, VariableElement {
7791 /** 7791 /**
7792 * An empty list of field elements. 7792 * An empty list of field elements.
7793 */ 7793 */
7794 static const List<LocalVariableElement> EMPTY_LIST = 7794 static const List<LocalVariableElement> EMPTY_LIST =
7795 const <LocalVariableElement>[]; 7795 const <LocalVariableElement>[];
7796
7797 /**
7798 * Return the resolved [VariableDeclaration] node that declares this
7799 * [LocalVariableElement].
7800 *
7801 * This method is expensive, because resolved AST might be evicted from cache,
7802 * so parsing and resolving will be performed.
7803 */
7804 @override
7805 VariableDeclaration computeNode();
7806 } 7796 }
7807 7797
7808 /** 7798 /**
7809 * A concrete implementation of a [LocalVariableElement]. 7799 * A concrete implementation of a [LocalVariableElement].
7810 */ 7800 */
7811 class LocalVariableElementImpl extends VariableElementImpl 7801 class LocalVariableElementImpl extends VariableElementImpl
7812 implements LocalVariableElement { 7802 implements LocalVariableElement {
7813 /** 7803 /**
7814 * The offset to the beginning of the visible range for this element. 7804 * The offset to the beginning of the visible range for this element.
7815 */ 7805 */
(...skipping 2907 matching lines...) Expand 10 before | Expand all | Expand 10 after
10723 10713
10724 @override 10714 @override
10725 void visitElement(Element element) { 10715 void visitElement(Element element) {
10726 int offset = element.nameOffset; 10716 int offset = element.nameOffset;
10727 if (offset != -1) { 10717 if (offset != -1) {
10728 map[offset] = element; 10718 map[offset] = element;
10729 } 10719 }
10730 super.visitElement(element); 10720 super.visitElement(element);
10731 } 10721 }
10732 } 10722 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698