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

Unified Diff: pkg/dartdoc/lib/mirrors.dart

Issue 11345026: Move location to DeclarationMirror (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« no previous file with comments | « pkg/dartdoc/lib/dartdoc.dart ('k') | pkg/dartdoc/lib/mirrors_util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dartdoc/lib/mirrors.dart
diff --git a/pkg/dartdoc/lib/mirrors.dart b/pkg/dartdoc/lib/mirrors.dart
index 231d1d0a362d18e3418e450f5c80aa1829222c63..804cc7ed1da7024585c76e3d37a240b08aa0474e 100644
--- a/pkg/dartdoc/lib/mirrors.dart
+++ b/pkg/dartdoc/lib/mirrors.dart
@@ -103,6 +103,10 @@ abstract class DeclarationMirror implements Mirror {
*/
String get qualifiedName;
+ /**
+ * The source location of this Dart language entity.
+ */
+ SourceLocation get location;
}
/**
@@ -132,11 +136,6 @@ abstract class LibraryMirror implements ObjectMirror, DeclarationMirror {
Map<String, ClassMirror> get types;
/**
- * Returns the source location for this library.
- */
- Location get location;
-
- /**
* Returns the canonical URI for this library.
*/
Uri get uri;
@@ -147,11 +146,6 @@ abstract class LibraryMirror implements ObjectMirror, DeclarationMirror {
*/
abstract class TypeMirror implements DeclarationMirror {
/**
- * Returns the source location for this type.
- */
- Location get location;
-
- /**
* Returns the library in which this member resides.
*/
LibraryMirror get library;
@@ -308,11 +302,6 @@ abstract class TypedefMirror implements ClassMirror {
*/
abstract class MemberMirror implements DeclarationMirror {
/**
- * Returns the source location for this member.
- */
- Location get location;
-
- /**
* Returns a mirror on the declaration immediately surrounding the reflectee.
* This could be a class, interface, library or another method or function.
*/
@@ -467,11 +456,11 @@ abstract class ParameterMirror implements Mirror {
}
/**
- * A [Location] describes the span of an entity in Dart source code.
- * A [Location] should be the minimum span that encloses the declaration of the
- * mirrored entity.
+ * A [SourceLocation] describes the span of an entity in Dart source code.
+ * A [SourceLocation] should be the minimum span that encloses the declaration
+ * of the mirrored entity.
*/
-abstract class Location {
+abstract class SourceLocation {
/**
* The character position where the location begins.
*/
@@ -483,7 +472,7 @@ abstract class Location {
int get end;
/**
- * Returns the [Source] in which this [Location] indexes.
+ * Returns the [Source] in which this [SourceLocation] indexes.
* If [:loc:] is a location, [:loc.source().text()[loc.start]:] is where it
* starts, and [:loc.source().text()[loc.end]:] is where it ends.
*/
« no previous file with comments | « pkg/dartdoc/lib/dartdoc.dart ('k') | pkg/dartdoc/lib/mirrors_util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698