@@ -274,9 +274,9 @@ def get_values(self):
if self.tok == ']':
self.accept()
return expr
- if self.tok not in "{['tfn":
+ if self.tok not in "{['tf":
raise self._parse_error(
- "expected '{', '[', ']', string, boolean or 'null'")
+ "expected '{', '[', ']', string, or boolean")
while True:
expr.append(self.get_expr(True))
if self.tok == ']':
@@ -295,12 +295,12 @@ def get_expr(self, nested):
elif self.tok == '[':
self.accept()
expr = self.get_values()
- elif self.tok in "'tfn":
+ elif self.tok in "'tf":
expr = self.val
self.accept()
else:
raise self._parse_error(
- "expected '{', '[', string, boolean or 'null'")
+ "expected '{', '[', string, or boolean")
return expr
def _get_doc(self, info):
@@ -1 +1 @@
-leading-comma-list.json:2:13: expected '{', '[', ']', string, boolean or 'null'
+leading-comma-list.json:2:13: expected '{', '[', ']', string, or boolean
@@ -1 +1 @@
-trailing-comma-list.json:2:36: expected '{', '[', string, boolean or 'null'
+trailing-comma-list.json:2:36: expected '{', '[', string, or boolean
Based on the docs, we don't support the null constant, and the code agrees. There's a few remnants where callers check .tok for 'n', and these can be removed. Signed-off-by: John Snow <jsnow@redhat.com> --- scripts/qapi/parser.py | 8 ++++---- tests/qapi-schema/leading-comma-list.err | 2 +- tests/qapi-schema/trailing-comma-list.err | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)