unicorn/qemu/scripts/qapi
Markus Armbruster 58246ea9d9
qapi: Record 'include' directives in intermediate representation
The include directive permits modular QAPI schemata, but the generated
code is monolithic all the same. To permit generating modular code,
the front end needs to pass more information on inclusions to the back
ends. The commit before last added the necessary information to the
parse tree. This commit adds it to the intermediate representation
and its QAPISchemaVisitor. A later commit will use this to to
generate modular code.

New entity QAPISchemaInclude represents inclusions. Call new visitor
method visit_include() for it, so visitors can see the sub-modules a
module includes.

Note that unlike other entities, QAPISchemaInclude has no name, and is
therefore not added to entity_dict.

New QAPISchemaEntity attribute @module names the entity's source file.
Call new visitor method visit_module() when it changes during a visit,
so visitors can keep track of the module being visited.

Backports commit cf40a0a5c2e1091846974cc8cc95a60e0b1db4af from qemu
2018-03-09 09:03:17 -05:00
..
__init__.py qapi-gen: New common driver for code and doc generators 2018-03-09 08:47:12 -05:00
common.py qapi: Record 'include' directives in intermediate representation 2018-03-09 09:03:17 -05:00
events.py qapi-gen: New common driver for code and doc generators 2018-03-09 08:47:12 -05:00
types.py qapi-gen: New common driver for code and doc generators 2018-03-09 08:47:12 -05:00
visit.py qapi-gen: New common driver for code and doc generators 2018-03-09 08:47:12 -05:00