Correct handling of binop with SpaceAfter in a Body def

This commit is contained in:
Joshua Warner 2025-01-14 20:48:23 -08:00
parent 51f2cdccf7
commit 7f1b3449a6
10 changed files with 172 additions and 5 deletions

View file

@ -4028,7 +4028,7 @@ enum OperatorOrDef {
}
fn bin_op<'a>(check_for_defs: bool) -> impl Parser<'a, BinOp, EExpr<'a>> {
move |_, state: State<'a>, min_indent| {
(move |_, state: State<'a>, min_indent| {
let start = state.pos();
let (_, op, state) = operator_help(EExpr::Start, EExpr::BadOperator, state, min_indent)?;
let err_progress = if check_for_defs {
@ -4046,7 +4046,8 @@ fn bin_op<'a>(check_for_defs: bool) -> impl Parser<'a, BinOp, EExpr<'a>> {
Err((err_progress, EExpr::BadOperator(":=", start)))
}
}
}
})
.trace("bin_op")
}
fn operator<'a>() -> impl Parser<'a, OperatorOrDef, EExpr<'a>> {