mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-28 15:24:13 +00:00
967c885108
Accept 'if' key in top-level elements, accepted as string or list of string type. The following patches will modify the test visitor to check the value is correctly saved, and generate #if/#endif code (as a single #if/endif line or a series for a list). Example of 'if' key: { 'struct': 'TestIfStruct', 'data': { 'foo': 'int' }, 'if': 'defined(TEST_IF_STRUCT)' } The generated code is for now *unconditional*. Later patches generate the conditionals. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180703155648.11933-2-marcandre.lureau@redhat.com> [Commit message and Documentation improved] Signed-off-by: Markus Armbruster <armbru@redhat.com>
4 lines
86 B
JSON
4 lines
86 B
JSON
# check empty 'if'
|
|
{ 'struct': 'TestIfStruct', 'data': { 'foo': 'int' },
|
|
'if': '' }
|