mirror of https://gitee.com/openkylin/qemu.git
22 lines
440 B
JSON
22 lines
440 B
JSON
# we require branches to be a struct name
|
|
# TODO: should we allow anonymous inline branch types?
|
|
|
|
##
|
|
# @TestEnum:
|
|
##
|
|
{ 'enum': 'TestEnum',
|
|
'data': [ 'value1', 'value2' ] }
|
|
##
|
|
# @Base:
|
|
##
|
|
{ 'struct': 'Base',
|
|
'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
|
|
##
|
|
# @TestUnion:
|
|
##
|
|
{ 'union': 'TestUnion',
|
|
'base': 'Base',
|
|
'discriminator': 'enum1',
|
|
'data': { 'value1': { 'string': 'str' },
|
|
'value2': { 'integer': 'int' } } }
|