qapidoc: introduce QAPISchemaIfCond.docgen()
commitd806f89f87152def5f422e946c84948831615236
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 4 Aug 2021 08:31:00 +0000 (4 12:31 +0400)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 26 Aug 2021 11:53:56 +0000 (26 13:53 +0200)
treef97a5d6ff3e81e413f3810fdb04347bfdc779898
parent6cc2e4817ff5b33d6f67e0a5f27dbd1112d1ecd5
qapidoc: introduce QAPISchemaIfCond.docgen()

Instead of building the condition documentation from a list of string,
use the result generated from QAPISchemaIfCond.docgen().

This changes the generated documentation from:
- COND1, COND2... (where COND1, COND2 are Literal nodes, and ',' is Text)
to:
- COND1 and COND2 (the whole string as a Literal node)

This will allow us to generate more complex conditions in the following
patches, such as "(COND1 and COND2) or COND3".

Adding back the differentiated formatting is left to the wish list.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210804083105.97531-6-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[TODO comment added]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
docs/sphinx/qapidoc.py
scripts/qapi/common.py
scripts/qapi/schema.py