fix: infinite-loop guard in block parser, retTypeKind/alloca type fixes — 11/14 pass

This commit is contained in:
2026-05-31 20:27:48 +03:00
parent 48ee40e7c5
commit dee9a3614c
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -662,7 +662,13 @@ func parserParseBlock(p: *Parser) -> *Block {
discard parserAdvance(p);
continue;
}
let beforePos: int = p.pos;
let s: *Stmt = parserParseStmt(p);
// Infinite-loop safeguard: if no progress, advance past current token
if p.pos == beforePos {
discard parserAdvance(p);
continue;
}
if s != null as *Stmt {
s.nextStmt = null as *Stmt;
if b.firstStmt == null as *Stmt {