On Thu, Aug 20, 2015 at 9:35 AM, Bruno Le Floch <[log in to unmask]> wrote:
> Such code may be simplified (and sped up a bit) if we provided a
> \peek_case_charcode:NnTF function. Is there interest for such an
> additional function?
> Actually, looking at mhchem a bit more, it seems that there is
> probably room for simplification if we provided better tools for
Yes, I think that would be sensible — I do some (somewhat manual)
peeking in unicode-math (looking ahead for superscript chars, etc.)
and the nesting of the code is pretty ugly. This could be an area that
could also benefit from a more structured way to do "do this and
gobble until marker if true, else another test" code pattern that
we've briefly discussed.
I should revisit *why* I thought the built-in peek functions weren't
enough when I first wrote the code... it's probable that things have
changed in the kernel since then.