correct pos on error

This commit is contained in:
SimonFJ20 2024-12-13 12:15:32 +01:00
parent 2d0e401bf3
commit 0875b447e4

View File

@ -133,7 +133,7 @@ export class Parser {
return this.expr({ type: "block", stmts, expr }, pos);
} else {
this.report("expected ';' or '}'");
return this.expr({ type: "error" }, pos);
return this.expr({ type: "error" }, this.pos());
}
}
}