On Fri, Apr 05, 2024 at 02:40:41PM +0100, Gavin Smith wrote: > On Fri, Apr 05, 2024 at 12:20:19AM +0200, Patrice Dumas wrote: > > I am not sure that no_store is used, but I think that it should be > > considered completely separately from no_build and the on-demand Perl > > structures build, as it is a completely different issue. > > parse_texi_piece is declared in Parsetexi.pm as > "sub parse_texi_piece($$;$$$)" while it is declared in ParserNonXS.pm as > "sub parse_texi_piece($$;$)", taking two fewer optional arguments. (I > believe this hasn't led to an error message from Perl as the function > signatures are not checked when a sub is called with method call syntax.) > The $no_store argument doesn't appear to be used anywhere.
Indeed, it is there for the consistency of the API, to have something similar with parse_texi_piece and parse_texi_line, but it is not currently used in texi2any or tests code. I think that it would be cleaner if it stayed. > I've committed a change to remove the $no_build parameter but not the > $no_store parameter. It seems to me that the changes are no complete, to me the _get_parser_info $no_build argument should be removed too, and the build_document should only be called if $no_store is set. It seems to me that is would be better for parse_texi_line, it seems to me that if $no_store is not set, the tree should not be built in _get_parser_info, but in parse_texi_line, such that the decision to get a tree or only a handler is possible in future changes of parse_texi_line. -- Pat