feat: commit latest build assets for sample

This commit is contained in:
rvcas
2022-12-05 14:09:52 -05:00
committed by Lucas
parent ed3d143477
commit 7e6dc978a1
8 changed files with 118 additions and 162 deletions

View File

@@ -1319,24 +1319,13 @@ pub fn pattern_parser() -> impl Parser<Token, ast::UntypedPattern, Error = Parse
label: Some(name),
value: pattern,
}),
r.clone().validate(|pattern, span, emit| {
let label = if let ast::UntypedPattern::Var { name, .. } = &pattern {
Some(name.clone())
} else {
emit(ParseError::expected_input_found(
pattern.location(),
None,
Some(error::Pattern::RecordPunning),
));
None
};
ast::CallArg {
select! {Token::Name{name} => name}.map_with_span(|name, span| ast::CallArg {
location: span,
value: ast::UntypedPattern::Var {
name: name.clone(),
location: span,
value: pattern,
label,
}
},
label: Some(name),
}),
))
.separated_by(just(Token::Comma))

View File

@@ -64,7 +64,7 @@ pub enum Error {
name: String,
},
#[error("Incorrect arity\n\nExpected\n\n{expected}\n\nGiven\n\n{given}\n")]
#[error("Incorrect arity\n\nExpected\n\n {expected}\n\nGiven\n\n {given}\n")]
IncorrectArity {
#[label]
location: Span,