return self._name(typ.name)
def _gen_json(self, name, mtype, obj):
return self._name(typ.name)
def _gen_json(self, name, mtype, obj):
self._gen_json(name, 'enum', {'values': values})
def visit_array_type(self, name, info, element_type):
self._gen_json(name, 'enum', {'values': values})
def visit_array_type(self, name, info, element_type):
- self._gen_json(name, 'array',
- {'element-type': self._use_type(element_type)})
+ element = self._use_type(element_type)
+ self._gen_json('[' + element + ']', 'array', {'element-type': element})
def visit_object_type_flat(self, name, info, members, variants):
obj = {'members': [self._gen_member(m) for m in members]}
def visit_object_type_flat(self, name, info, members, variants):
obj = {'members': [self._gen_member(m) for m in members]}
for m in variants.variants]})
def visit_command(self, name, info, arg_type, ret_type,
for m in variants.variants]})
def visit_command(self, name, info, arg_type, ret_type,
arg_type = arg_type or self._schema.the_empty_object_type
ret_type = ret_type or self._schema.the_empty_object_type
self._gen_json(name, 'command',
{'arg-type': self._use_type(arg_type),
'ret-type': self._use_type(ret_type)})
arg_type = arg_type or self._schema.the_empty_object_type
ret_type = ret_type or self._schema.the_empty_object_type
self._gen_json(name, 'command',
{'arg-type': self._use_type(arg_type),
'ret-type': self._use_type(ret_type)})
- def visit_event(self, name, info, arg_type):
+ def visit_event(self, name, info, arg_type, boxed):
arg_type = arg_type or self._schema.the_empty_object_type
self._gen_json(name, 'event', {'arg-type': self._use_type(arg_type)})
arg_type = arg_type or self._schema.the_empty_object_type
self._gen_json(name, 'event', {'arg-type': self._use_type(arg_type)})
opt_unmask = False
(input_file, output_dir, do_c, do_h, prefix, opts) = \
opt_unmask = False
(input_file, output_dir, do_c, do_h, prefix, opts) = \