fix: infinite-loop guard in block parser, retTypeKind/alloca type fixes — 11/14 pass
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user