add maybe not source maps on block entry

This commit is contained in:
SimonFJ20 2024-12-13 11:14:05 +01:00
parent c86cf105b9
commit fccced6174

View File

@ -419,11 +419,9 @@ export class Lowerer {
this.program.add(Ops.PushPtr, contineLabel); this.program.add(Ops.PushPtr, contineLabel);
this.program.add(Ops.Jump); this.program.add(Ops.Jump);
this.program.setLabel(breakLabel); this.program.setLabel(breakLabel);
this.addSourceMap({ index: 0, line: 1, col: 1 });
if (expr.vtype!.type === "null") { if (expr.vtype!.type === "null") {
this.program.add(Ops.PushNull); this.program.add(Ops.PushNull);
} }
this.breakStack.pop(); this.breakStack.pop();
} }
@ -438,7 +436,6 @@ export class Lowerer {
this.lowerStmt(stmt); this.lowerStmt(stmt);
} }
if (expr.kind.expr) { if (expr.kind.expr) {
this.addSourceMap(expr.kind.expr.pos);
this.lowerExpr(expr.kind.expr); this.lowerExpr(expr.kind.expr);
} else { } else {
this.program.add(Ops.PushNull); this.program.add(Ops.PushNull);