John Snow <js...@redhat.com> writes:

> This patch begins distinguishing "Plain" sections as being either
> "Intro" or "Details" sections for the purpose of knowing when and where
> to inline those sections.
>
> Signed-off-by: John Snow <js...@redhat.com>

[...]

> diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
> index a8b30ae1a4b..b2f77ffdd7a 100644
> --- a/scripts/qapi/parser.py
> +++ b/scripts/qapi/parser.py

[...]

> @@ -584,14 +584,20 @@ def get_doc(self) -> 'QAPIDoc':
>                      if text:
>                          doc.append_line(text)
>                      line = self.get_doc_indented(doc)
> -                    no_more_args = True
> +                    have_tagged = True
>                  elif line.startswith('='):
>                      raise QAPIParseError(
>                          self,
>                          "unexpected '=' markup in definition documentation")
>                  else:
>                      # plain paragraph(s)
> -                    doc.ensure_untagged_section(self.info)
> +                    if have_tagged:
> +                        no_more_tags = True

@no_more_tags is not used in this patch.  Does the conditional
assignment belong to the next patch?

> +
> +                    # Paragraphs before tagged sections are "intro" 
> paragraphs.
> +                    # Any appearing after are "detail" paragraphs.
> +                    intro = not have_tagged
> +                    doc.ensure_untagged_section(self.info, intro)
>                      doc.append_line(line)
>                      line = self.get_doc_paragraph(doc)
>          else:

[...]


Reply via email to