On Sun, Jan 22, 2023 at 09:19:30PM +0000, Gavin Smith wrote:
> On Sat, Jan 21, 2023 at 03:12:15PM +0100, Patrice Dumas wrote:
> > Please commit, I'll change the perl parser afterwards, it looks very
> > easy to implement. I have a commit related to source marks ready that I
> > can commit before or after changing the perl parser for this change,
> > actually.
>
> Thanks for updating the perl parser.
>
> I was thinking the nesting warning for @ref could be removed now it is
> redundant: for
>
> @ref{aaa@ref{bbb}}
>
> there are two warnings:
>
> test.texi:6: warning: @ref should not appear in @ref
> test.texi:6: warning: @ref should not appear anywhere inside cross-reference
>
> However, this appears to be also an issue for all of the commands
> that are marked "contain_simple_text" in command_data.txt. Would
> it make sense to replace the nesting_context.xref counter with
> a nesting_context.simple_text counter and use it for all of the
> contain_simple_text commands?
I think so. The implementation I had in mind replaced
check_valid_nesting by a check on the whole command stack. Replacing
check_valid_nesting by a forwarding of the nesting context is equally good.
> Perhaps we should also keep a stack of which commands incremented this
> counter so we can report the invalid nesting in an error message?
It is a necessity, in my opinion.
--
Pat