Skip to content

Parsing block comments in v1.0.0.alpha.7 #670

Answered by zesterer
Divy1211 asked this question in Q&A
Discussion options

You must be logged in to vote

You're probably looking for and_is and not. You can use them together like:

any().and_is(just("*/").not())

This tells chumsky to accept a character that is not the start of the sequence */.

Note that I think you might misunderstand what none_of does: like one_of, it accepts a set of characters to reject, not a sequence. So none_of("*/") will accept any character except * and /.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Divy1211
Comment options

Answer selected by Divy1211
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