Chromium Code Reviews| 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 991b1c6bb9d060ce44ca842555b345fd2dc509e6..049b36aa3b304bd9b604e96a8fa47c00de32e9f5 100644 |
| --- a/tools/json_schema_compiler/idl_schema.py |
| +++ b/tools/json_schema_compiler/idl_schema.py |
| @@ -319,9 +319,12 @@ class Enum(object): |
| 'type': 'string', |
| 'enum': enum} |
| for property_name in ( |
|
not at google - send to devlin
2014/05/14 23:43:43
should fit on 1 line now
David Tseng
2014/05/15 01:12:37
Not anymore with the below change.
|
| - 'inline_doc', 'noinline_doc', 'nodoc', 'cpp_omit_enum_type',): |
| + 'inline_doc', 'noinline_doc', 'nodoc',): |
| if self.node.GetProperty(property_name): |
| result[property_name] = True |
|
not at google - send to devlin
2014/05/14 23:43:43
hm I wonder if the "default" value for IDL attribu
David Tseng
2014/05/15 01:12:37
Done (after verifying True gets returned for prope
|
| + if self.node.GetProperty('cpp_enum_prefix_override'): |
| + result['cpp_enum_prefix_override'] = self.node.GetProperty( |
| + 'cpp_enum_prefix_override') |
| if self.node.GetProperty('deprecated'): |
| result[deprecated] = self.node.GetProperty('deprecated') |
| return result |
| @@ -407,7 +410,7 @@ class IDLSchema(object): |
| internal = False |
| description = None |
| platforms = None |
| - compiler_options = None |
| + compiler_options = {} |
| deprecated = None |
| for node in self.idl: |
| if node.cls == 'Namespace': |
| @@ -418,7 +421,7 @@ class IDLSchema(object): |
| description = '' |
| namespace = Namespace(node, description, nodoc, internal, |
| platforms=platforms, |
| - compiler_options=compiler_options, |
| + compiler_options=compiler_options or None, |
| deprecated=deprecated) |
| namespaces.append(namespace.process()) |
| nodoc = False |
| @@ -437,7 +440,9 @@ class IDLSchema(object): |
| elif node.name == 'platforms': |
| platforms = list(node.value) |
| elif node.name == 'implemented_in': |
| - compiler_options = {'implemented_in': node.value} |
| + compiler_options['implemented_in'] = node.value |
| + elif node.name == 'camel_case_enum_to_string': |
| + compiler_options['camel_case_enum_to_string'] = node.value |
| elif node.name == 'deprecated': |
| deprecated = str(node.value) |
| else: |