|
@@ -556,9 +556,11 @@ def _append_body_line(self, line):
|
|
if not line.endswith(':'):
|
|
if not line.endswith(':'):
|
|
raise QAPIParseError(self._parser, "line should end with ':'")
|
|
raise QAPIParseError(self._parser, "line should end with ':'")
|
|
self.symbol = line[1:-1]
|
|
self.symbol = line[1:-1]
|
|
- # FIXME invalid names other than the empty string aren't flagged
|
|
|
|
|
|
+ # Invalid names are not checked here, but the name provided MUST
|
|
|
|
+ # match the following definition, which *is* validated in expr.py.
|
|
if not self.symbol:
|
|
if not self.symbol:
|
|
- raise QAPIParseError(self._parser, "invalid name")
|
|
|
|
|
|
+ raise QAPIParseError(
|
|
|
|
+ self._parser, "name required after '@'")
|
|
elif self.symbol:
|
|
elif self.symbol:
|
|
# This is a definition documentation block
|
|
# This is a definition documentation block
|
|
if name.startswith('@') and name.endswith(':'):
|
|
if name.startswith('@') and name.endswith(':'):
|