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

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

Issue 11275097: Merge SourceLocation and Source (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert use of Pattern.allMatches Created 8 years, 1 month 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/mirrors.dart ('k') | pkg/dartdoc/lib/src/dartdoc/comment_map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dartdoc/lib/mirrors_util.dart
diff --git a/pkg/dartdoc/lib/mirrors_util.dart b/pkg/dartdoc/lib/mirrors_util.dart
index 35fc16dbbba617004371d731e6a5868506932245..cede225be99a109917dbbcaa04c9047e58434ebd 100644
--- a/pkg/dartdoc/lib/mirrors_util.dart
+++ b/pkg/dartdoc/lib/mirrors_util.dart
@@ -6,7 +6,6 @@ library mirrors_util;
// TODO(rnystrom): Use "package:" URL (#4968).
import 'mirrors.dart';
-import '../../../lib/compiler/implementation/util/characters.dart';
//------------------------------------------------------------------------------
// Utility functions for using the Mirror API
@@ -45,7 +44,7 @@ Iterable<ClassMirror> computeSubdeclarations(ClassMirror type) {
}
LibraryMirror findLibrary(MemberMirror member) {
- ContainerMirror owner = member.owner;
+ DeclarationMirror owner = member.owner;
if (owner is LibraryMirror) {
return owner;
} else if (owner is TypeMirror) {
@@ -54,25 +53,6 @@ LibraryMirror findLibrary(MemberMirror member) {
throw new Exception('Unexpected owner: ${owner}');
}
-
-/**
- * Returns the column of the start of a location.
- */
-int getLocationColumn(SourceLocation location) {
- String text = location.source.text;
- int index = location.start-1;
- var column = 0;
- while (0 <= index && index < text.length) {
- var charCode = text.charCodeAt(index);
- if (charCode == $CR || charCode == $LF) {
- break;
- }
- index--;
- column++;
- }
- return column;
-}
-
class HierarchyIterable implements Iterable<ClassMirror> {
final bool includeType;
final ClassMirror type;
« no previous file with comments | « pkg/dartdoc/lib/mirrors.dart ('k') | pkg/dartdoc/lib/src/dartdoc/comment_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698