Index: pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart |
diff --git a/pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart b/pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart |
index 1ec5d068c3d7d21920f4017a3f349692f6e66106..20f5fc18cae39d0a199500226d94f76f9a29a55f 100644 |
--- a/pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart |
+++ b/pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart |
@@ -12,28 +12,34 @@ class TopLevelDeclaration { |
final String name; |
TopLevelDeclaration(this.kind, this.name); |
-} |
-/** |
- * Kind of a top-level declaration. |
- * |
- * We don't need it to be precise, just enough to support quick fixes. |
- */ |
-enum TopLevelDeclarationKind { type, function, variable } |
+ @override |
+ String toString() => '($kind, $name)'; |
+} |
/** |
- * Top-level declarations in the export namespace of a library. |
+ * A declaration in a source. |
*/ |
-class TopLevelLibraryDeclarations { |
+class TopLevelDeclarationInSource { |
/** |
- * The source of the library. |
+ * The declaring source. |
*/ |
final Source source; |
/** |
- * Top-level declarations in the export namespace of the library. |
+ * The declaration. |
*/ |
- final List<TopLevelDeclaration> declarations = []; |
+ final TopLevelDeclaration declaration; |
- TopLevelLibraryDeclarations(this.source); |
+ TopLevelDeclarationInSource(this.source, this.declaration); |
+ |
+ @override |
+ String toString() => '($source, $declaration)'; |
} |
+ |
+/** |
+ * Kind of a top-level declaration. |
+ * |
+ * We don't need it to be precise, just enough to support quick fixes. |
+ */ |
+enum TopLevelDeclarationKind { type, function, variable } |