Skip to content

Commit

Permalink
qapi: Fix a misleading parser error message
Browse files Browse the repository at this point in the history
When choking on a token where an expression is expected, we report
'Expected "{", "[" or string'.  Close, but no cigar.  Fix it to
Expected '"{", "[", string, boolean or "null"'.

Missed in commit e53188a.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1489582656-31133-48-git-send-email-armbru@redhat.com>
  • Loading branch information
Markus Armbruster committed Mar 16, 2017
1 parent c261394 commit 012b126
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/qapi.py
Expand Up @@ -519,7 +519,8 @@ def get_expr(self, nested):
expr = self.val
self.accept()
else:
raise QAPIParseError(self, 'Expected "{", "[" or string')
raise QAPIParseError(self, 'Expected "{", "[", string, '
'boolean or "null"')
return expr

def get_doc(self, info):
Expand Down
2 changes: 1 addition & 1 deletion tests/qapi-schema/trailing-comma-list.err
@@ -1 +1 @@
tests/qapi-schema/trailing-comma-list.json:2:36: Expected "{", "[" or string
tests/qapi-schema/trailing-comma-list.json:2:36: Expected "{", "[", string, boolean or "null"

0 comments on commit 012b126

Please sign in to comment.