summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2026-06-11 00:23:32 -0400
committerMarkus Armbruster <armbru@redhat.com>2026-06-16 15:36:08 +0200
commitebb49d4bb6bcc4f97401fabf3310937d44a2226b (patch)
tree19b0b1ba69d4c206d616dc46f9f6e92f49c8d1b8 /scripts
parenta5635d61812cb08291ca7a0a7addff11fbb6511b (diff)
downloadqemu-ebb49d4bb6bcc4f97401fabf3310937d44a2226b.tar.gz
qemu-ebb49d4bb6bcc4f97401fabf3310937d44a2226b.zip
qapi: add doc comment "Intro" section parsing
Add parsing for explicit Intro section syntax. A side effect of this patch is that we will (currently) always create an empty Intro section, similar to how we used to have an empty Plain section. The tests are adjusted accordingly, rendered document output does not change at all. Signed-off-by: John Snow <jsnow@redhat.com> Message-ID: <20260611042332.482979-14-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qapi/parser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index b7a7b9465a..9e14c2f792 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -542,8 +542,8 @@ class QAPISchemaParser:
if not symbol:
raise QAPIParseError(self, "name required after '@'")
doc = QAPIDoc(info, symbol)
- self.accept(False)
- line = self.get_doc_line()
+ doc.all_sections.append(QAPIDoc.Section(info, QAPIDoc.Kind.INTRO))
+ line = self.get_doc_indented(doc)
no_more_args = False
while line is not None: