mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qapi: Merge adjacent untagged sections
The parser mostly doesn't create adjacent untagged sections, and merging the ones it does create is hardly worth the bother. I'm doing it to avoid behavioral change in the next commit. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20240216145841.2099240-14-armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
fedc04c9fc
commit
0b82a7440c
2 changed files with 3 additions and 2 deletions
|
@ -719,6 +719,9 @@ class QAPIDoc:
|
|||
self._start_symbol_section(self.features, name)
|
||||
|
||||
def _start_section(self, tag: Optional[str] = None) -> None:
|
||||
if not tag and not self._section.tag:
|
||||
# extend current section
|
||||
return
|
||||
if tag in ('Returns', 'Since') and self.has_section(tag):
|
||||
raise QAPIParseError(self._parser,
|
||||
"duplicated '%s' section" % tag)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue