| 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 c6e49bf507b43646b710574786bf31944cff8346..ffdb9605ecb6833816e5290290567b67784ef16e 100644
|
| --- a/tools/json_schema_compiler/idl_schema.py
|
| +++ b/tools/json_schema_compiler/idl_schema.py
|
| @@ -307,7 +307,8 @@ class Enum(object):
|
| 'description': self.description,
|
| 'type': 'string',
|
| 'enum': enum}
|
| - for property_name in ('inline_doc', 'noinline_doc', 'nodoc'):
|
| + for property_name in (
|
| + 'inline_doc', 'noinline_doc', 'nodoc', 'cpp_omit_enum_type',):
|
| if self.node.GetProperty(property_name):
|
| result[property_name] = True
|
| return result
|
| @@ -325,7 +326,8 @@ class Namespace(object):
|
| nodoc=False,
|
| internal=False,
|
| platforms=None,
|
| - compiler_options=None):
|
| + compiler_options=None,
|
| + allow_custom_filename=False):
|
| self.namespace = namespace_node
|
| self.nodoc = nodoc
|
| self.internal = internal
|
| @@ -336,6 +338,7 @@ class Namespace(object):
|
| self.types = []
|
| self.callbacks = OrderedDict()
|
| self.description = description
|
| + self.allow_custom_filename = allow_custom_filename
|
|
|
| def process(self):
|
| for node in self.namespace.GetChildren():
|
| @@ -364,7 +367,8 @@ class Namespace(object):
|
| 'internal': self.internal,
|
| 'events': self.events,
|
| 'platforms': self.platforms,
|
| - 'compiler_options': compiler_options}
|
| + 'compiler_options': compiler_options,
|
| + 'allow_custom_filename': self.allow_custom_filename}
|
|
|
| def process_interface(self, node):
|
| members = []
|
| @@ -391,6 +395,7 @@ class IDLSchema(object):
|
| description = None
|
| platforms = None
|
| compiler_options = None
|
| + allow_custom_filename = False
|
| for node in self.idl:
|
| if node.cls == 'Namespace':
|
| if not description:
|
| @@ -400,12 +405,14 @@ class IDLSchema(object):
|
| description = ''
|
| namespace = Namespace(node, description, nodoc, internal,
|
| platforms=platforms,
|
| - compiler_options=compiler_options)
|
| + compiler_options=compiler_options,
|
| + allow_custom_filename=allow_custom_filename)
|
| namespaces.append(namespace.process())
|
| nodoc = False
|
| internal = False
|
| platforms = None
|
| compiler_options = None
|
| + allow_custom_filename = False
|
| elif node.cls == 'Copyright':
|
| continue
|
| elif node.cls == 'Comment':
|
| @@ -419,6 +426,8 @@ class IDLSchema(object):
|
| platforms = list(node.value)
|
| elif node.name == 'implemented_in':
|
| compiler_options = {'implemented_in': node.value}
|
| + elif node.name == 'allow_custom_filename':
|
| + allow_custom_filename = True
|
| else:
|
| continue
|
| else:
|
|
|