qemu-e2k/scripts/qapi
Markus Armbruster 157dd36395 qapi: Simplify how QAPIDoc implements its state machine
QAPIDoc uses a state machine to for processing of documentation lines.
Its state is encoded as an enum QAPIDoc._state (well, as enum-like
class actually, thanks to our infatuation with Python 2).

All we ever do with the state is calling the state's function to
process a line of documentation.  The enum values effectively serve as
handles for the functions.

Eliminate the rather wordy indirection: store the function to call in
QAPIDoc._append_line.  Update and improve comments.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190606153803.5278-8-armbru@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
[Commit message typo fixed]
2019-06-12 18:37:17 +02:00
..
__init__.py qapi-gen: New common driver for code and doc generators 2018-03-02 13:14:09 -06:00
commands.py Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
common.py qapi: Simplify how QAPIDoc implements its state machine 2019-06-12 18:37:17 +02:00
doc.py qapi: Allow documentation for features 2019-06-12 18:35:57 +02:00
events.py Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
introspect.py qapi: Add feature flags to struct types 2019-06-12 18:34:26 +02:00
types.py qapi: Add feature flags to struct types 2019-06-12 18:34:26 +02:00
visit.py qapi: Add feature flags to struct types 2019-06-12 18:34:26 +02:00