mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Disallow conditionals after neg/not
This commit is contained in:
parent
7eb9909ac5
commit
19f8cc532a
5 changed files with 24 additions and 2 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue