QDoc: Introduce brace-delimited paragraph parsing mode
Curly braces are used in QDoc's syntax to delimit arguments passed to
various commands. DocParser::getArgument() recognizes braces and is
capable of parsing multi-line arguments containing whitespace, as well
as macro expansion within arguments.
However, no other QDoc commands can be parsed while retrieving an
argument string with getArgument(). For this to happen, DocParser would
have to be able to fall back to the main parse() loop without losing
the in-argument context.
Having the ability to parse commands - especially formatting commands -
would be beneficial for e.g. \details, to enable rich formatting for
its argument (the summary text).
Introduce a new paragraph parsing state `InBraceDelimitedParagraph` to
allow this. Commands that use this way of parsing can have full syntax
capabilities in their brace-delimited argument(s) by opening a new
paragraph with dedicated `Left` and `Right` Atom types, without having
to introduce new block-command (\beginfoo .. \endfoo) pairs.
Task-number: QTBUG-144788
Change-Id: I1e49955ee8630644206458bad9a171f39743e984
Reviewed-by: Paul Wicking <paul.wicking@qt.io>