mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 03:43:37 +08:00
3e7fb5811b
When a sub-module doesn't contain any definitions, we don't generate code for it, but we do generate the #include. We generate code only for modules that get visited. QAPISchema.visit() visits only modules that have definitions. It can visit modules multiple times. Clean this up as follows. Collect entities in their QAPISchemaModule. Have QAPISchema.visit() call QAPISchemaModule.visit() for each module. Have QAPISchemaModule.visit() call .visit_module() for itself, and QAPISchemaEntity.visit() for each of its entities. This way, we visit each module exactly once. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191120182551.23795-6-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
24 lines
444 B
Plaintext
24 lines
444 B
Plaintext
module None
|
|
object q_empty
|
|
enum QType
|
|
prefix QTYPE
|
|
member none
|
|
member qnull
|
|
member qnum
|
|
member qstring
|
|
member qdict
|
|
member qlist
|
|
member qbool
|
|
module include-repetition.json
|
|
include comments.json
|
|
include include-repetition-sub.json
|
|
include comments.json
|
|
module comments.json
|
|
enum Status
|
|
member good
|
|
member bad
|
|
member ugly
|
|
module include-repetition-sub.json
|
|
include comments.json
|
|
include comments.json
|