diff mbox

[for-2.9,31/47] qapi: Fix detection of doc / expression mismatch

Message ID bde5a409-92c8-b0b9-178a-a12ddb2ea479@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Blake March 14, 2017, 8:35 p.m. UTC
On 03/13/2017 01:18 AM, Markus Armbruster wrote:
> This fixes the errors uncovered by the previous commit.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---

>  
>              expr = self.get_expr(False)
>              if 'include' in expr:
> +                self.reject_expr_doc()
>                  if len(expr) != 1:

Do you also need to handle 'pragma' expressions added earlier in the series?

/me goes and experiments:


Oops - back to accepting the program.
diff mbox

Patch

diff --git i/tests/qapi-schema/doc-bad-expr.json
w/tests/qapi-schema/doc-bad-expr.json
index 0caa0ae..6c1204d 100644
--- i/tests/qapi-schema/doc-bad-expr.json
+++ w/tests/qapi-schema/doc-bad-expr.json
@@ -4,4 +4,5 @@ 
 # @foo:
 ##
 { 'include': 'empty.json' }
+{ 'pragma': {} }
 { 'struct': 'foo', 'data': {} }