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

Unified Diff: tools/json_schema_compiler/idl_schema.py

Issue 56543003: Add "implemented_in" key in IDL schema compiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 | « no previous file | tools/json_schema_compiler/idl_schema_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/idl_schema.py
diff --git a/tools/json_schema_compiler/idl_schema.py b/tools/json_schema_compiler/idl_schema.py
index 238fb05e3ce5b388a8c776bd4942f5984801269a..8317d0b481e8223c459df8125de30f0c65ce24df 100644
--- a/tools/json_schema_compiler/idl_schema.py
+++ b/tools/json_schema_compiler/idl_schema.py
@@ -324,11 +324,13 @@ class Namespace(object):
description,
nodoc=False,
internal=False,
- platforms=None):
+ platforms=None,
+ compiler_options={}):
not at google - send to devlin 2013/11/02 00:01:52 don't put objects as default values. they're share
Haojian Wu 2013/11/02 01:27:33 Done.
self.namespace = namespace_node
self.nodoc = nodoc
self.internal = internal
self.platforms = platforms
+ self.compiler_options = compiler_options
self.events = []
self.functions = []
self.types = []
@@ -357,7 +359,8 @@ class Namespace(object):
'functions': self.functions,
'internal': self.internal,
'events': self.events,
- 'platforms': self.platforms}
+ 'platforms': self.platforms,
+ 'compiler_options': self.compiler_options}
def process_interface(self, node):
members = []
@@ -383,6 +386,7 @@ class IDLSchema(object):
internal = False
description = None
platforms = None
+ compiler_options = {}
not at google - send to devlin 2013/11/02 00:01:52 =None?
Haojian Wu 2013/11/02 01:27:33 Done.
for node in self.idl:
if node.cls == 'Namespace':
if not description:
@@ -390,7 +394,8 @@ class IDLSchema(object):
print('%s must have a namespace-level comment. This will '
'appear on the API summary page.' % node.GetName())
description = ''
- namespace = Namespace(node, description, nodoc, internal, platforms)
+ namespace = Namespace(node, description, nodoc, internal, platforms,
+ compiler_options)
not at google - send to devlin 2013/11/02 00:01:52 name optional arguments. platforms=platforms, comp
Haojian Wu 2013/11/02 01:27:33 Done.
namespaces.append(namespace.process())
nodoc = False
internal = False
@@ -406,6 +411,8 @@ class IDLSchema(object):
internal = bool(node.value)
elif node.name == 'platforms':
platforms = list(node.value)
+ elif node.name == 'implemented_in':
+ compiler_options = dict(implemented_in=node.value)
not at google - send to devlin 2013/11/02 00:01:52 personally I would prefer {'implemented_in': node.
Haojian Wu 2013/11/02 01:27:33 Done.
else:
continue
else:
« no previous file with comments | « no previous file | tools/json_schema_compiler/idl_schema_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698