Yield proper user-facing error when inferring Fuzzer usage

This commit is contained in:
KtorZ
2024-03-02 12:55:56 +01:00
parent cf61387a41
commit bbc9fc5762
4 changed files with 218 additions and 34 deletions

View File

@@ -69,9 +69,10 @@ pub fn via() -> impl Parser<Token, ast::UntypedArgVia, Error = ParseError> {
}),
))
.then(just(Token::Colon).ignore_then(annotation()).or_not())
.map_with_span(|(arg_name, annotation), location| (arg_name, annotation, location))
.then_ignore(just(Token::Via))
.then(fuzzer())
.map_with_span(|((arg_name, annotation), via), location| ast::ArgVia {
.map(|((arg_name, annotation, location), via)| ast::ArgVia {
arg_name,
via,
annotation,