we don't need this

This commit is contained in:
Folkert 2021-03-06 15:41:12 +01:00
parent 9306c3698c
commit 5d9e4d8e3b

View file

@ -757,13 +757,11 @@ fn def_help<'a>(min_indent: u16) -> impl Parser<'a, Def<'a>, EExpr<'a>> {
enum DefKind {
Colon,
Equal,
Backpassing,
}
let def_colon_or_equals = one_of![
map!(equals_with_indent_help(), |_| DefKind::Equal),
map!(colon_with_indent(), |_| DefKind::Colon),
map!(backpassing_with_indent(), |_| DefKind::Backpassing),
];
then(
@ -830,23 +828,6 @@ fn def_help<'a>(min_indent: u16) -> impl Parser<'a, Def<'a>, EExpr<'a>> {
state,
))
}
DefKind::Backpassing => {
// Spaces after the '=' (at a normal indentation level) and then the expr.
// The expr itself must be indented more than the pattern and '='
let (_, body_expr, state) = space0_before_e(
loc!(move |arena, state| parse_expr_help(indented_more, arena, state)),
min_indent,
EExpr::Space,
EExpr::IndentStart,
)
.parse(arena, state)?;
Ok((
MadeProgress,
Def::Backpassing(arena.alloc([loc_pattern]), arena.alloc(body_expr)),
state,
))
}
},
)
}