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

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

Issue 1414903005: Begin generating code for summary serialization/deserialization. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix handling of List<int> Created 5 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/analyzer/tool/summary/idl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..d0089eac4794a6eb2aa0d53e46b9d2d8dac83092
--- /dev/null
+++ b/pkg/analyzer/tool/summary/idl_model.dart
@@ -0,0 +1,63 @@
+// Copyright (c) 2015, 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.
+
+/**
+ * This file contains a set of concrete classes representing an in-memory
+ * semantic model of the IDL used to code generate summary serialization and
+ * deserialization code.
+ */
+library analyzer.tool.summary.idl_model;
+
+/**
+ * Information about a single class defined in the IDL.
+ */
+class ClassDeclaration {
+ /**
+ * Fields defined in the class.
+ */
+ final Map<String, FieldType> fields = <String, FieldType>{};
+}
+
+/**
+ * Information about a single enum defined in the IDL.
+ */
+class EnumDeclaration {
+ /**
+ * List of enumerated values.
+ */
+ final List<String> values = <String>[];
+}
+
+/**
+ * Information about the type of a class field defined in the IDL.
+ */
+class FieldType {
+ /**
+ * Type of the field (e.g. 'int').
+ */
+ final String typeName;
+
+ /**
+ * Indicates whether this field contains a list of the type specified in
+ * [typeName].
+ */
+ final bool isList;
+
+ FieldType(this.typeName, this.isList);
+}
+
+/**
+ * Top level representation of the summary IDL.
+ */
+class Idl {
+ /**
+ * Classes defined in the IDL.
+ */
+ final Map<String, ClassDeclaration> classes = <String, ClassDeclaration>{};
+
+ /**
+ * Enums defined in the IDL.
+ */
+ final Map<String, EnumDeclaration> enums = <String, EnumDeclaration>{};
+}
« no previous file with comments | « pkg/analyzer/tool/summary/idl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698