chumsky icon indicating copy to clipboard operation
chumsky copied to clipboard

Add a `spanned` method for automatically wrapping the parser result in a `Span`

Open TheOnlyTails opened this issue 8 months ago • 5 comments

This would be a very simple utility method I feel is missing right now, as a shorthand:

parser.map_extra(|it, e| (it, e.span()))
// into
parser.spanned()

It's not essential or anything, but it'll definitely be nice to have.

TheOnlyTails avatar Jun 06 '24 17:06 TheOnlyTails