qapi: Move context-free checking to the proper place
commit4ebda5abdb9704a3bde299209f8fcaf034079095
authorMarkus Armbruster <armbru@redhat.com>
Fri, 27 Sep 2019 13:46:30 +0000 (27 15:46 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Sat, 28 Sep 2019 15:17:19 +0000 (28 17:17 +0200)
tree40cbc1a678c54863ce2d59e61a7de038fe8773d8
parentfa110c6a9e6c0ae0ce2d4bcf5771cdb8c3e53a7e
qapi: Move context-free checking to the proper place

QAPISchemaCommand.check() and QAPISchemaEvent().check() check 'data'
is present when 'boxed': true.  That's context-free.  Move to
check_command() and check_event().

Tweak the error message while there.

check_exprs() & friends now check exactly what qapi-code-gen.txt calls
the second layer of syntax.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190927134639.4284-18-armbru@redhat.com>
scripts/qapi/common.py
tests/qapi-schema/event-boxed-empty.err