| 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 519ae56e5a8b819b99e06d347f9bc94c347e77aa..bedc2b347bfc4db84ad17a6d6aa6cee5da5163b8 100644
|
| --- a/tools/json_schema_compiler/idl_schema.py
|
| +++ b/tools/json_schema_compiler/idl_schema.py
|
| @@ -309,7 +309,8 @@ class Namespace(object):
|
| dictionary that the JSON schema compiler expects to see.
|
| '''
|
|
|
| - def __init__(self, namespace_node, nodoc=False, internal=False):
|
| + def __init__(self, namespace_node, nodoc=False, internal=False,
|
| + description=None):
|
| self.namespace = namespace_node
|
| self.nodoc = nodoc
|
| self.internal = internal
|
| @@ -317,6 +318,7 @@ class Namespace(object):
|
| self.functions = []
|
| self.types = []
|
| self.callbacks = OrderedDict()
|
| + self.description = description
|
|
|
| def process(self):
|
| for node in self.namespace.children:
|
| @@ -334,6 +336,7 @@ class Namespace(object):
|
| else:
|
| sys.exit('Did not process %s %s' % (node.cls, node))
|
| return {'namespace': self.namespace.GetName(),
|
| + 'description': self.description,
|
| 'nodoc': self.nodoc,
|
| 'types': self.types,
|
| 'functions': self.functions,
|
| @@ -361,16 +364,19 @@ class IDLSchema(object):
|
| namespaces = []
|
| nodoc = False
|
| internal = False
|
| + description = None
|
| for node in self.idl:
|
| if node.cls == 'Namespace':
|
| - namespace = Namespace(node, nodoc, internal)
|
| + namespace = Namespace(node, nodoc, internal, description)
|
| namespaces.append(namespace.process())
|
| nodoc = False
|
| internal = False
|
| elif node.cls == 'Copyright':
|
| continue
|
| elif node.cls == 'Comment':
|
| - continue
|
| + description = node.GetName()
|
| + if description == '':
|
| + description = None
|
| elif node.cls == 'ExtAttribute':
|
| if node.name == 'nodoc':
|
| nodoc = bool(node.value)
|
|
|