mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Fix double-wrapping of spaces before implements opaque keyword by making them distinct
This commit is contained in:
parent
8955f3e124
commit
6edfc0aa90
15 changed files with 313 additions and 251 deletions
|
@ -1158,20 +1158,17 @@ fn alias_signature<'a>() -> impl Parser<'a, Loc<TypeAnnotation<'a>>, EExpr<'a>>
|
|||
increment_min_indent(specialize_err(EExpr::Type, type_annotation::located(false)))
|
||||
}
|
||||
|
||||
fn opaque_signature<'a>() -> impl Parser<
|
||||
'a,
|
||||
(
|
||||
Loc<TypeAnnotation<'a>>,
|
||||
Option<Loc<ImplementsAbilities<'a>>>,
|
||||
),
|
||||
EExpr<'a>,
|
||||
> {
|
||||
fn opaque_signature<'a>(
|
||||
) -> impl Parser<'a, (Loc<TypeAnnotation<'a>>, Option<&'a ImplementsAbilities<'a>>), EExpr<'a>> {
|
||||
and(
|
||||
specialize_err(EExpr::Type, type_annotation::located_opaque_signature(true)),
|
||||
optional(backtrackable(specialize_err(
|
||||
EExpr::Type,
|
||||
space0_before_e(type_annotation::implements_abilities(), EType::TIndentStart),
|
||||
))),
|
||||
optional(map_with_arena(
|
||||
backtrackable(specialize_err(
|
||||
EExpr::Type,
|
||||
type_annotation::implements_abilities(),
|
||||
)),
|
||||
|arena, item| &*arena.alloc(item),
|
||||
)),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue