On Fri, Feb 16, 2024 at 03:58:40PM +0100, Markus Armbruster wrote: > QAPIDoc stores a reference to QAPIParser just to pass it to > QAPIParseError. The resulting error position depends on the state of > the parser. It happens to be the current comment line. Servicable, > but action at a distance. > > The commit before previous moved most uses of QAPIParseError from > QAPIDoc to QAPIParser. There are just three left. Convert them to > QAPISemError. This involves passing info to a few methods. Then drop > the reference to QAPIParser. > > The three errors lose the column number. Not really interesting here: > it's the comment line's indentation. > > Signed-off-by: Markus Armbruster <arm...@redhat.com> > --- > scripts/qapi/parser.py | 66 +++++++++------------ > tests/qapi-schema/doc-duplicated-arg.err | 2 +- > tests/qapi-schema/doc-duplicated-return.err | 2 +- > tests/qapi-schema/doc-duplicated-since.err | 2 +- > tests/qapi-schema/doc-empty-arg.err | 2 +- > 5 files changed, 32 insertions(+), 42 deletions(-)
Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|