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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/element.dart

Issue 26307005: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
Index: pkg/analyzer_experimental/lib/src/generated/element.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/element.dart b/pkg/analyzer_experimental/lib/src/generated/element.dart
index 11c04a8e6cfa9b6ba07e55671aa79640f46d68ff..067b214c9a4903c92e2d0e62cc4194afa991d7f4 100644
--- a/pkg/analyzer_experimental/lib/src/generated/element.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/element.dart
@@ -973,6 +973,23 @@ abstract class ImportElement implements Element, UriReferencedElement {
* @return the prefix that was specified as part of the import directive
*/
PrefixElement get prefix;
+
+ /**
+ * Return the offset of the prefix of this import in the file that contains this import directive,
+ * or `-1` if this import is synthetic, does not have a prefix, or otherwise does not have
+ * an offset.
+ *
+ * @return the offset of the prefix of this import
+ */
+ int get prefixOffset;
+
+ /**
+ * Return the offset of the character immediately following the last character of this node's URI,
+ * or `-1` for synthetic import.
+ *
+ * @return the offset of the character just past the node's URI
+ */
+ int get uriEnd;
}
/**
* The interface `LabelElement` defines the behavior of elements representing a label
@@ -3826,6 +3843,23 @@ abstract class HtmlScriptElementImpl extends ElementImpl implements HtmlScriptEl
class ImportElementImpl extends ElementImpl implements ImportElement {
/**
+ * The offset of this directive, may be `-1` if synthetic.
+ */
+ int _offset = -1;
+
+ /**
+ * The offset of the character immediately following the last character of this node's URI, may be
+ * `-1` if synthetic.
+ */
+ int _uriEnd = -1;
+
+ /**
+ * The offset of the prefix of this import in the file that contains the this import directive, or
+ * `-1` if this import is synthetic.
+ */
+ int _prefixOffset = 0;
+
+ /**
* The URI that is specified by this directive.
*/
String _uri;
@@ -3856,7 +3890,9 @@ class ImportElementImpl extends ElementImpl implements ImportElement {
LibraryElement get importedLibrary => _importedLibrary;
ElementKind get kind => ElementKind.IMPORT;
PrefixElement get prefix => _prefix;
+ int get prefixOffset => _prefixOffset;
String get uri => _uri;
+ int get uriEnd => _uriEnd;
/**
* Set the combinators that were specified as part of the import directive to the given array of
@@ -3879,6 +3915,13 @@ class ImportElementImpl extends ElementImpl implements ImportElement {
}
/**
+ * Set the offset of this directive.
+ */
+ void set offset(int offset) {
+ this._offset = offset;
+ }
+
+ /**
* Set the prefix that was specified as part of the import directive to the given prefix.
*
* @param prefix the prefix that was specified as part of the import directive
@@ -3888,6 +3931,14 @@ class ImportElementImpl extends ElementImpl implements ImportElement {
}
/**
+ * Set the offset of the prefix of this import in the file that contains the this import
+ * directive.
+ */
+ void set prefixOffset(int prefixOffset) {
+ this._prefixOffset = prefixOffset;
+ }
+
+ /**
* Set the URI that is specified by this directive.
*
* @param uri the URI that is specified by this directive.
@@ -3895,6 +3946,14 @@ class ImportElementImpl extends ElementImpl implements ImportElement {
void set uri(String uri) {
this._uri = uri;
}
+
+ /**
+ * Set the the offset of the character immediately following the last character of this node's
+ * URI. `-1` for synthetic import.
+ */
+ void set uriEnd(int uriEnd) {
+ this._uriEnd = uriEnd;
+ }
void visitChildren(ElementVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_prefix, visitor);
@@ -3903,7 +3962,7 @@ class ImportElementImpl extends ElementImpl implements ImportElement {
builder.append("import ");
((_importedLibrary as LibraryElementImpl)).appendTo(builder);
}
- String get identifier => ((_importedLibrary as LibraryElementImpl)).identifier;
+ String get identifier => "${((_importedLibrary as LibraryElementImpl)).identifier}@${_offset}";
}
/**
* Instances of the class `LabelElementImpl` implement a `LabelElement`.
@@ -6681,16 +6740,16 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
return false;
}
javaSetAdd(visitedClasses, element);
- InterfaceType supertype = element.supertype;
+ InterfaceType supertype = superclass;
if (supertype != null && ((supertype as InterfaceTypeImpl)).isMoreSpecificThan2(s, visitedClasses)) {
return true;
}
- for (InterfaceType interfaceType in element.interfaces) {
+ for (InterfaceType interfaceType in interfaces) {
if (((interfaceType as InterfaceTypeImpl)).isMoreSpecificThan2(s, visitedClasses)) {
return true;
}
}
- for (InterfaceType mixinType in element.mixins) {
+ for (InterfaceType mixinType in mixins) {
if (((mixinType as InterfaceTypeImpl)).isMoreSpecificThan2(s, visitedClasses)) {
return true;
}
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/ast.dart ('k') | pkg/analyzer_experimental/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698