Allow for when x in y { (minor oversight in syntax)

This commit is contained in:
gingerBill
2024-06-29 10:13:15 +01:00
parent 06652bebce
commit 906afa4154
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -689,7 +689,12 @@ parse_when_stmt :: proc(p: ^Parser) -> ^ast.When_Stmt {
prev_level := p.expr_level
p.expr_level = -1
prev_allow_in_expr := p.allow_in_expr
p.allow_in_expr = true
cond = parse_expr(p, false)
p.allow_in_expr = prev_allow_in_expr
p.expr_level = prev_level
if cond == nil {