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 <noreply@anthropic.com>
This commit is contained in:
@@ -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()?);
|
||||
|
||||
Reference in New Issue
Block a user