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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * This file contains a set of concrete classes representing an in-memory 6 * This file contains a set of concrete classes representing an in-memory
7 * semantic model of the IDL used to code generate summary serialization and 7 * semantic model of the IDL used to code generate summary serialization and
8 * deserialization code. 8 * deserialization code.
9 */ 9 */
10 library analyzer.tool.summary.idl_model; 10 library analyzer.tool.summary.idl_model;
11 11
12 /** 12 /**
13 * Information about a single class defined in the IDL. 13 * Information about a single class defined in the IDL.
14 */ 14 */
15 class ClassDeclaration { 15 class ClassDeclaration extends Declaration {
16 /** 16 /**
17 * Fields defined in the class. 17 * Fields defined in the class.
18 */ 18 */
19 final Map<String, FieldType> fields = <String, FieldType>{}; 19 final List<FieldDeclaration> fields = <FieldDeclaration>[];
20 20
21 /** 21 /**
22 * Indicates whether the class has the `topLevel` annotation. 22 * Indicates whether the class has the `topLevel` annotation.
23 */ 23 */
24 final bool isTopLevel; 24 final bool isTopLevel;
25 25
26 ClassDeclaration(this.isTopLevel); 26 ClassDeclaration(String documentation, String name, this.isTopLevel)
27 : super(documentation, name);
28 }
29
30 /**
31 * Information about a declaration in the IDL.
32 */
33 class Declaration {
34 /**
35 * The optional documentation, may be `null`.
36 */
37 final String documentation;
38
39 /**
40 * The name of the declaration.
41 */
42 final String name;
43
44 Declaration(this.documentation, this.name);
27 } 45 }
28 46
29 /** 47 /**
30 * Information about a single enum defined in the IDL. 48 * Information about a single enum defined in the IDL.
31 */ 49 */
32 class EnumDeclaration { 50 class EnumDeclaration extends Declaration {
33 /** 51 /**
34 * List of enumerated values. 52 * List of enumerated values.
35 */ 53 */
36 final List<String> values = <String>[]; 54 final List<String> values = <String>[];
55
56 EnumDeclaration(String documentation, String name)
57 : super(documentation, name);
37 } 58 }
38 59
39 /** 60 /**
61 * Information about a single class field defined in the IDL.
62 */
63 class FieldDeclaration extends Declaration {
64 /**
65 * The file of the field.
66 */
67 final FieldType type;
68
69 FieldDeclaration(String documentation, String name, this.type)
70 : super(documentation, name);
71 }
72
73 /**
40 * Information about the type of a class field defined in the IDL. 74 * Information about the type of a class field defined in the IDL.
41 */ 75 */
42 class FieldType { 76 class FieldType {
43 /** 77 /**
44 * Type of the field (e.g. 'int'). 78 * Type of the field (e.g. 'int').
45 */ 79 */
46 final String typeName; 80 final String typeName;
47 81
48 /** 82 /**
49 * Indicates whether this field contains a list of the type specified in 83 * Indicates whether this field contains a list of the type specified in
(...skipping 11 matching lines...) Expand all
61 /** 95 /**
62 * Classes defined in the IDL. 96 * Classes defined in the IDL.
63 */ 97 */
64 final Map<String, ClassDeclaration> classes = <String, ClassDeclaration>{}; 98 final Map<String, ClassDeclaration> classes = <String, ClassDeclaration>{};
65 99
66 /** 100 /**
67 * Enums defined in the IDL. 101 * Enums defined in the IDL.
68 */ 102 */
69 final Map<String, EnumDeclaration> enums = <String, EnumDeclaration>{}; 103 final Map<String, EnumDeclaration> enums = <String, EnumDeclaration>{};
70 } 104 }
OLDNEW
« 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