From a11071ab9536a5082e6612bc91e878805ee58a8d Mon Sep 17 00:00:00 2001 From: dimgigov Date: Sun, 7 Jun 2026 16:38:42 +0300 Subject: [PATCH] fix(parser): skip newlines before checking decl kind --- src/parser.bux | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parser.bux b/src/parser.bux index a7df45c..4e7854f 100644 --- a/src/parser.bux +++ b/src/parser.bux @@ -1950,6 +1950,10 @@ func parserParseExternDecl(p: *Parser, isPublic: bool) -> *Decl { // --------------------------------------------------------------------------- func parserParseDecl(p: *Parser) -> *Decl { + // Skip newlines before declaration (matching bootstrap behavior) + while parserCheck(p, tkNewLine) || parserCheck(p, tkSemicolon) { + discard parserAdvance(p); + } let isPublic: bool = parserMatch(p, tkPub); let kind: int = parserPeek(p, 0);