mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
fix extra ampersands
This commit is contained in:
parent
b6116eeb98
commit
899cbeabd7
79 changed files with 372 additions and 376 deletions
|
@ -252,7 +252,7 @@ fn underscore_expression<'a>() -> impl Parser<'a, Expr<'a>, EExpr<'a>> {
|
|||
|
||||
match output {
|
||||
Some(name) => Ok((MadeProgress, Expr::Underscore(name), final_state)),
|
||||
None => Ok((MadeProgress, Expr::Underscore(&""), final_state)),
|
||||
None => Ok((MadeProgress, Expr::Underscore(""), final_state)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ pub fn positive_number_literal<'a>() -> impl Parser<'a, NumLiteral<'a>, Number>
|
|||
move |_arena, state: State<'a>| {
|
||||
match state.bytes.get(0) {
|
||||
Some(first_byte) if (*first_byte as char).is_ascii_digit() => {
|
||||
parse_number_base(false, &state.bytes, state)
|
||||
parse_number_base(false, state.bytes, state)
|
||||
}
|
||||
_ => {
|
||||
// this is not a number at all
|
||||
|
@ -33,7 +33,7 @@ pub fn number_literal<'a>() -> impl Parser<'a, NumLiteral<'a>, Number> {
|
|||
parse_number_base(true, &state.bytes[1..], state)
|
||||
}
|
||||
Some(first_byte) if (*first_byte as char).is_ascii_digit() => {
|
||||
parse_number_base(false, &state.bytes, state)
|
||||
parse_number_base(false, state.bytes, state)
|
||||
}
|
||||
_ => {
|
||||
// this is not a number at all
|
||||
|
|
|
@ -259,7 +259,7 @@ fn loc_ident_pattern_help<'a>(
|
|||
Located {
|
||||
region: loc_ident.region,
|
||||
value: Pattern::Malformed(
|
||||
String::from_str_in(&malformed_str, &arena).into_bump_str(),
|
||||
String::from_str_in(&malformed_str, arena).into_bump_str(),
|
||||
),
|
||||
},
|
||||
state,
|
||||
|
@ -299,7 +299,7 @@ fn underscore_pattern_help<'a>() -> impl Parser<'a, Pattern<'a>, EPattern<'a>> {
|
|||
|
||||
match output {
|
||||
Some(name) => Ok((MadeProgress, Pattern::Underscore(name), final_state)),
|
||||
None => Ok((MadeProgress, Pattern::Underscore(&""), final_state)),
|
||||
None => Ok((MadeProgress, Pattern::Underscore(""), final_state)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -303,12 +303,12 @@ fn applied_type<'a>(min_indent: u16) -> impl Parser<'a, TypeAnnotation<'a>, Type
|
|||
),
|
||||
|(ctor, args): (TypeAnnotation<'a>, Vec<'a, Located<TypeAnnotation<'a>>>)| {
|
||||
match &ctor {
|
||||
TypeAnnotation::Apply(ref module_name, ref name, _) => {
|
||||
TypeAnnotation::Apply(module_name, name, _) => {
|
||||
if args.is_empty() {
|
||||
// ctor is already an Apply with no args, so return it directly.
|
||||
ctor
|
||||
} else {
|
||||
TypeAnnotation::Apply(*module_name, *name, args.into_bump_slice())
|
||||
TypeAnnotation::Apply(module_name, name, args.into_bump_slice())
|
||||
}
|
||||
}
|
||||
TypeAnnotation::Malformed(_) => ctor,
|
||||
|
@ -371,7 +371,7 @@ fn expression<'a>(min_indent: u16) -> impl Parser<'a, Located<TypeAnnotation<'a>
|
|||
.parse(arena, state)?;
|
||||
|
||||
// prepare arguments
|
||||
let mut arguments = Vec::with_capacity_in(rest.len() + 1, &arena);
|
||||
let mut arguments = Vec::with_capacity_in(rest.len() + 1, arena);
|
||||
arguments.push(first);
|
||||
arguments.extend(rest);
|
||||
let output = arena.alloc(arguments);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue