Skip to content
qapi: untie 'if' conditions from C preprocessor

Hi,

This series makes the 'if' conditions less liberal, by formalizing a simple
expression tree based on bare boolean logic of configure option identifiers.

(this allows to express conditions in Rust in my QAPI-Rust PoC series)

This is based on John Snow QAPI pt4:
https://patchew.org/QEMU/20210421192233.3542904-1-jsnow@redhat.com/

Based-on: <20210421192233.3542904-2-jsnow@redhat.com>

thanks

v3:
 - rebasing (after ~6 months)
 - improve documentation generation
 - drop typing annotations from schema.py
 - commit message tweaks

v2:
 - fix the normalization step to handle recursive expr
 - replace IfCond by QAPISchemaIf (JohnS)
 - commit message and documentation tweaks
 - mypy/flake8/isort