John Snow <[email protected]> writes:
> This clarifies sections that are mistaken by the parser as "intro"
> sections to be "details" sections instead.
>
> Signed-off-by: John Snow <[email protected]>
> ---
> qapi/machine.json | 2 ++
> qapi/migration.json | 4 ++++
> qapi/qom.json | 4 ++++
> qapi/yank.json | 2 ++
> scripts/qapi/parser.py | 8 ++++++++
> 5 files changed, 20 insertions(+)
Missing updates for the new syntax
* Documentation: docs/devel/qapi-code-gen.rst
* Positive test case(s): tests/qapi-schema/doc-good.json
* Maybe a negative test case for _tag_check() failure
[...]
> diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
> index c5d2b950a82..5890a13b5ba 100644
> --- a/scripts/qapi/parser.py
> +++ b/scripts/qapi/parser.py
> @@ -544,6 +544,14 @@ def _tag_check(what: str) -> None:
> raise QAPIParseError(
> self, 'feature descriptions expected')
> have_tagged = True
> + elif line == 'Details:':
> + _tag_check("Details")
This one.
> + self.accept(False)
> + line = self.get_doc_line()
> + while line == '':
> + self.accept(False)
> + line = self.get_doc_line()
> + have_tagged = True
> elif match := self._match_at_name_colon(line):
> # description
> if have_tagged: