[PATCH v4 09/13] qapi/parser: add mea culpa comment for ensure_returns
John Snow <[email protected]>
| Newsgroups | org.kernel.vger.linux-edac,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
These algorithms are quite a mess currently, but they are temporary until we add the inliner which will address these issues more holistically. For now, add the "mea culpa". Signed-off-by: John Snow <[email protected]> --- scripts/qapi/parser.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index 261f8ba9f8b..b0cead38b1f 100644 --- a/scripts/qapi/parser.py +++ b/scripts/qapi/parser.py @@ -866,6 +866,13 @@ def connect_feature(self, feature: 'QAPISchemaFeature') -> None: self._features[feature.name].connect(feature) def ensure_returns(self, info: QAPISourceInfo) -> None: + # This is more complicated than it ought to be. The doc + # parser should already know where a generated RETURNS section + # should go. It currently doesn't, mostly because it accepts + # tagged sections in any order. + # + # TODO: Tighten doc syntax and simplify. + if any(s.kind == QAPIDoc.Kind.RETURNS for s in self.all_sections): return -- 2.54.0