summary refs log tree commit diff stats
path: root/scripts/qapi/parser.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2024-06-26 18:21:12 -0400
committerMarkus Armbruster <armbru@redhat.com>2024-07-06 08:58:24 +0200
commit83deda876940116d31bf47c51e62e0fe625e8655 (patch)
tree09c5300b9d78d9222d57e2c7f1f91137bfd38bba /scripts/qapi/parser.py
parent939c639e1d7c1d78bcc262368ab1fb78f09d0bfe (diff)
downloadfocaccia-qemu-83deda876940116d31bf47c51e62e0fe625e8655.tar.gz
focaccia-qemu-83deda876940116d31bf47c51e62e0fe625e8655.zip
qapi/parser: fix comment parsing immediately following a doc block
If a comment immediately follows a doc block, the parser doesn't ignore
that token appropriately. Fix that.

e.g.

> ##
> # = Hello World!
> ##
>
> # I'm a comment!

will break the parser, because it does not properly ignore the comment
token if it immediately follows a doc block.

Fixes: 3d035cd2cca6 (qapi: Rewrite doc comment parser)
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240626222128.406106-7-jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi/parser.py')
-rw-r--r--scripts/qapi/parser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index 1ef1f85b02..c3d20cc01b 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -583,7 +583,7 @@ class QAPISchemaParser:
                 line = self.get_doc_line()
                 first = False
 
-        self.accept(False)
+        self.accept()
         doc.end()
         return doc