Eric Blake <ebl...@redhat.com> writes: > The previous commit demonstrated that the generator overlooked some > fairly basic broken expressions: > - missing metataype > - metatype key has a non-string value > - unknown key in relation to the metatype > - conflicting metatype (this patch treats the second metatype as an > unknown key of the first key visited, which is not necessarily the > first key the user typed)
Not ideal, but good enough for a development tool. > > Add check_keys to cover these situations, and update testcases to > match. A couple other tests (enum-missing-data, indented-expr) had > to change since the validation added here occurs so early. > > While valid .json files won't trigger any of these cases, we might > as well be nicer to developers that make a typo while trying to add > new QAPI code. > > Signed-off-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Markus Armbruster <arm...@redhat.com>