Replies: 1 comment 1 reply
-
|
Welcome to chumsky! The reason that the error happens is similar to why in the following code, you'd have to specify a type for fn into_vec<T: Clone>(t: T) -> Vec<T> {
let ret: Vec<_> = vec![];
todo!("push add t to `ret`")
}In this case, the simplest solution is to give the partial result for pub fn lexer<'src>() -> impl Parser<'src, LexerInput<'src>, LexerOutput<'src>, extra::Err<Rich<'src, char>>> {
let ident = text::ident().map(TokenKind::Identifier);
chumsky::prelude::choice((ident,))
}If you'd want to maintain |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
okay so im just trying to get something very basic up and running
but no matter which prelude function i use i always get the same error:
but looking at the docs and the examples, specifying the generics shouldn't be required. How do i fix this? help is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions