diff --git a/compiler/parser.ts b/compiler/parser.ts index 757b85e..0f62f85 100644 --- a/compiler/parser.ts +++ b/compiler/parser.ts @@ -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()); } } }