to_string function for tokens
It is sometimes useful to translate tokens to strings, for example to report parse errors.
I currently use a hack to derive a to_string
function automatically, see
here
and
here.
But this is not pretty, and I'm wondering if a to_string
function is fundamental enough that it could instead be generated by menhir? That would make things much cleaner.