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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/top_level_declarations.dart

Issue 2545753003: Compute top-level declarations in a file. (Closed)
Patch Set: Created 4 years 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/lib/src/dart/analysis/top_level_declarations.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/top_level_declarations.dart b/pkg/analyzer/lib/src/dart/analysis/top_level_declarations.dart
new file mode 100644
index 0000000000000000000000000000000000000000..1ec5d068c3d7d21920f4017a3f349692f6e66106
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/analysis/top_level_declarations.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:front_end/src/base/source.dart';
+
+/**
+ * Information about a single top-level declaration.
+ */
+class TopLevelDeclaration {
+ final TopLevelDeclarationKind kind;
+ 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 }
+
+/**
+ * Top-level declarations in the export namespace of a library.
+ */
+class TopLevelLibraryDeclarations {
+ /**
+ * The source of the library.
+ */
+ final Source source;
+
+ /**
+ * Top-level declarations in the export namespace of the library.
+ */
+ final List<TopLevelDeclaration> declarations = [];
+
+ TopLevelLibraryDeclarations(this.source);
+}
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/file_state.dart ('k') | pkg/analyzer/test/src/dart/analysis/file_state_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698