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

Unified Diff: pkg/analyzer/tool/summary/idl_model.dart

Issue 1563453002: Generate documentation for summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/tool/summary/idl_model.dart
diff --git a/pkg/analyzer/tool/summary/idl_model.dart b/pkg/analyzer/tool/summary/idl_model.dart
index e298b977d90d4fe18e4cff9747bce3748a4dc06e..07be0396c5ec99cac4eef4ad8438b8b571123b99 100644
--- a/pkg/analyzer/tool/summary/idl_model.dart
+++ b/pkg/analyzer/tool/summary/idl_model.dart
@@ -12,28 +12,62 @@ library analyzer.tool.summary.idl_model;
/**
* Information about a single class defined in the IDL.
*/
-class ClassDeclaration {
+class ClassDeclaration extends Declaration {
/**
* Fields defined in the class.
*/
- final Map<String, FieldType> fields = <String, FieldType>{};
+ final List<FieldDeclaration> fields = <FieldDeclaration>[];
/**
* Indicates whether the class has the `topLevel` annotation.
*/
final bool isTopLevel;
- ClassDeclaration(this.isTopLevel);
+ ClassDeclaration(String documentation, String name, this.isTopLevel)
+ : super(documentation, name);
+}
+
+/**
+ * Information about a declaration in the IDL.
+ */
+class Declaration {
+ /**
+ * The optional documentation, may be `null`.
+ */
+ final String documentation;
+
+ /**
+ * The name of the declaration.
+ */
+ final String name;
+
+ Declaration(this.documentation, this.name);
}
/**
* Information about a single enum defined in the IDL.
*/
-class EnumDeclaration {
+class EnumDeclaration extends Declaration {
/**
* List of enumerated values.
*/
final List<String> values = <String>[];
+
+ EnumDeclaration(String documentation, String name)
+ : super(documentation, name);
+}
+
+/**
+ * Information about a single class field defined in the IDL.
+ */
+class FieldDeclaration extends Declaration {
+ /**
+ * The file of the field.
+ */
+ final FieldType type;
+
+ FieldDeclaration(String documentation, String name, this.type)
+ : super(documentation, name);
}
/**
« pkg/analyzer/tool/summary/generate.dart ('K') | « pkg/analyzer/tool/summary/generate.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698