fix(parser): skip newlines before checking decl kind

This commit is contained in:
2026-06-07 16:38:42 +03:00
parent 093e08a2b9
commit a11071ab95
+4
View File
@@ -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);