From 1132c621c679aa5b6f5fcf1adb1703c6d9a7b6a2 Mon Sep 17 00:00:00 2001 From: Brandon Lucas Date: Thu, 19 Feb 2026 01:38:05 -0500 Subject: [PATCH] fix: allow newlines before `then` in if/then/else expressions The parser now skips newlines between the condition and `then` keyword, enabling multiline if expressions like: if long_condition then expr1 else expr2 Co-Authored-By: Claude Opus 4.6 --- src/parser.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parser.rs b/src/parser.rs index 114e85d..37d4d85 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1792,6 +1792,7 @@ impl Parser { let condition = Box::new(self.parse_expr()?); + self.skip_newlines(); self.expect(TokenKind::Then)?; self.skip_newlines(); let then_branch = Box::new(self.parse_expr()?);