On Tue, Mar 01, 2022 at 07:48:14PM +0000, Gavin Smith wrote: > On Tue, Mar 01, 2022 at 01:42:50AM +0100, Patrice Dumas wrote: > > I commited an implementation. The XS parser part is incomplete, I coded > > passing the informations, but not using the information, for instance in > > encode_file_name(). Also encode_file_name() should be used for CPP file > > directive, as I reported in another mail. > > I'm testing a change for #line directives.
I just tested that it does not happen with the perl Parser. I let you look in more details, maybe the issue is that top->source_info is not current_source_info at the point of the line directive. I'll add a test. > > I found a possible bug with #line: > > $ cat test.texi > \input texinfo > > #line 100 "foo.ptexi" > > @gggg > > aaa > > @bye > $ ../texi2any.pl test.texi > test.texi:5: unknown command `gggg' > > $ cat test2.texi > \input texinfo > > @node Top > @top > > #line 100 "foo.ptexi" > > @gggg > > aaa > > @bye > $ ../texi2any.pl test2.texi > foo.ptexi:102: unknown command `gggg' > > > It looks like it has to be inside a node to work.
