Disallow conditionals after neg/not

This commit is contained in:
Joshua Warner 2024-12-02 18:10:44 -08:00
parent 7eb9909ac5
commit 19f8cc532a
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 24 additions and 2 deletions

View file

@ -306,7 +306,7 @@ fn loc_possibly_negative_or_negated_term<'a>(
let (_, (loc_op, loc_expr), state) = and(
loc(unary_negate()),
loc_possibly_negative_or_negated_term(options, true, allow_conditional),
loc_possibly_negative_or_negated_term(options, true, false),
)
.parse(arena, state, min_indent)?;
@ -323,7 +323,7 @@ fn loc_possibly_negative_or_negated_term<'a>(
and(
loc(unary_not()).trace("not"),
space0_before_e(
loc_possibly_negative_or_negated_term(options, true, allow_conditional),
loc_possibly_negative_or_negated_term(options, true, false),
EExpr::IndentStart
)
.trace("not_expr")