Browse Source

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>
pull/48/head
Markus Armbruster 10 years ago
parent
commit
012b126de2
  1. 3
      scripts/qapi.py
  2. 2
      tests/qapi-schema/trailing-comma-list.err

3
scripts/qapi.py

@ -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):

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

Loading…
Cancel
Save