diff options
Diffstat (limited to 'scripts/qapi/common.py')
-rw-r--r-- | scripts/qapi/common.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index 142ab276ff..b3383b17ef 100644 --- a/scripts/qapi/common.py +++ b/scripts/qapi/common.py @@ -559,7 +559,11 @@ class QAPISchemaParser(object): self.line += 1 self.line_pos = self.cursor elif not self.tok.isspace(): - raise QAPIParseError(self, "Stray '%s'" % self.tok) + # Show up to next structural, whitespace or quote + # character + match = re.match('[^[\\]{}:,\\s\'"]+', + self.src[self.cursor-1:]) + raise QAPIParseError(self, "Stray '%s'" % match.group(0)) def get_members(self): expr = OrderedDict() |