Skip to content
Discussion options

You must be logged in to vote

I think you're fairly close with this as-is. You might find the number parser in the json.rs example to be useful, it pretty much does what you're looking for.

Lexing tokens like this is definitely the sort of thing that's currently a bit verbose in chumsky today. This will be improving though! The soon-to-be-merged zero-copy branch will include a regex combinator, allowing you to parse something like this in a single line!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@duskmoon314
Comment options

@zesterer
Comment options

Answer selected by duskmoon314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants