qapi: Fix a misleading parser error message

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>
This commit is contained in:
Markus Armbruster 2017-03-15 13:57:36 +01:00
parent c261394978
commit 012b126de2
2 changed files with 3 additions and 2 deletions

View File

@ -519,7 +519,8 @@ class QAPISchemaParser(object):
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):

View File

@ -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"