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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/generate/data.py

Issue 262633005: Adding attributes to module and struct in mojom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix annotations Created 6 years, 7 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: mojo/public/tools/bindings/pylib/mojom/generate/data.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/data.py b/mojo/public/tools/bindings/pylib/mojom/generate/data.py
index 513b50b696d2bfe4a6c3fbfb91f61818730abfb5..cbe65a7c51d1b375866493ff1fa887d82f0c3451 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/data.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/data.py
@@ -132,6 +132,7 @@ def StructToData(struct):
def StructFromData(module, data):
struct = mojom.Struct(module=module)
struct.name = data['name']
+ struct.attributes = data['attributes']
struct.spec = 'x:' + module.namespace + '.' + struct.name
module.kinds[struct.spec] = struct
struct.enums = map(lambda enum:
@@ -284,6 +285,7 @@ def ModuleFromData(data):
module.name = data['name']
module.namespace = data['namespace']
+ module.attributes = data['attributes']
# Imports must come first, because they add to module.kinds which is used
# by by the others.
module.imports = map(
« no previous file with comments | « mojo/public/interfaces/bindings/tests/test_structs.mojom ('k') | mojo/public/tools/bindings/pylib/mojom/parse/parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698