From 121e1217241ed6b12d5dd3fc1840a8ac48f067ce Mon Sep 17 00:00:00 2001 From: bakk Date: Sun, 16 Jan 2022 21:06:51 +0100 Subject: [PATCH] Allow piecewise without 'otherwise' branch --- kalk/src/parser.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/kalk/src/parser.rs b/kalk/src/parser.rs index fba8aa2..f1aa1db 100644 --- a/kalk/src/parser.rs +++ b/kalk/src/parser.rs @@ -264,6 +264,7 @@ fn parse_piecewise(context: &mut Context) -> Result { (previous(context).kind == TokenKind::Semicolon || previous(context).kind == TokenKind::Newline) && !reached_otherwise + && !match_token(context, TokenKind::ClosedBrace) } {} advance(context);