Skip to content
Discussion options

You must be logged in to vote

Leaving a solution for anyone that comes across this problem:

just(Token::KwAnd)
    .ignore_then(match_list.clone())
    .map_err_with_state(|err, span, _| {
        ParserError::MatchListAfterLogicalOperator(span.union(err.span()))
    })
    .map(ParserMatcher::And)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by filiptrplan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant