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

Unified Diff: pkg/analyzer/lib/dart/element/element.dart

Issue 2991453002: Restore UriReferencedElement and its uri/uriOffset/uriEnd properties. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/dart/element/element.dart
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index ae0c19d51245ad8751988300a4c01cd244cefda6..ce89e898f89f7552b1b173f38ab3e590679e51ad 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -412,7 +412,7 @@ abstract class ClassMemberElement implements Element {
*
* Clients may not extend, implement or mix-in this class.
*/
-abstract class CompilationUnitElement implements Element {
+abstract class CompilationUnitElement implements Element, UriReferencedElement {
/**
* An empty list of compilation unit elements.
*/
@@ -1161,7 +1161,7 @@ abstract class ExecutableElement implements FunctionTypedElement {
*
* Clients may not extend, implement or mix-in this class.
*/
-abstract class ExportElement implements Element {
+abstract class ExportElement implements Element, UriReferencedElement {
/**
* An empty list of export elements.
*/
@@ -1349,7 +1349,7 @@ abstract class HideElementCombinator implements NamespaceCombinator {
*
* Clients may not extend, implement or mix-in this class.
*/
-abstract class ImportElement implements Element {
+abstract class ImportElement implements Element, UriReferencedElement {
/**
* An empty list of import elements.
*/
@@ -1949,6 +1949,31 @@ abstract class TypeParameterizedElement implements Element {
abstract class UndefinedElement implements Element {}
/**
+ * An element included into a library using some URI.
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+abstract class UriReferencedElement implements Element {
+ /**
+ * Return the URI that is used to include this element into the enclosing
+ * library, or `null` if this is the defining compilation unit of a library.
+ */
+ String get uri;
+
+ /**
+ * Return the offset of the character immediately following the last character
+ * of this node's URI, or `-1` for synthetic import.
+ */
+ int get uriEnd;
+
+ /**
+ * Return the offset of the URI in the file, or `-1` if this element is
+ * synthetic.
+ */
+ int get uriOffset;
+}
+
+/**
* A variable. There are more specific subclasses for more specific kinds of
* variables.
*
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698