mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 18:16:31 +00:00
add sourcemaps 2
This commit is contained in:
parent
c5ec4a9970
commit
f2163901d8
@ -50,7 +50,6 @@ export class Lowerer {
|
||||
}
|
||||
|
||||
private lowerStaticStmt(stmt: Stmt) {
|
||||
this.addSourceMap(stmt.pos);
|
||||
switch (stmt.kind.type) {
|
||||
case "fn":
|
||||
return this.lowerFnStmt(stmt);
|
||||
@ -387,8 +386,8 @@ export class Lowerer {
|
||||
this.program.setLabel(falseLabel);
|
||||
|
||||
if (expr.kind.falsy) {
|
||||
this.addSourceMap(expr.kind.truthy.pos);
|
||||
this.lowerExpr(expr.kind.falsy!);
|
||||
this.addSourceMap(expr.kind.falsy.pos);
|
||||
this.lowerExpr(expr.kind.falsy);
|
||||
} else {
|
||||
this.program.add(Ops.PushNull);
|
||||
}
|
||||
@ -430,6 +429,7 @@ export class Lowerer {
|
||||
this.lowerStmt(stmt);
|
||||
}
|
||||
if (expr.kind.expr) {
|
||||
this.addSourceMap(expr.kind.expr.pos);
|
||||
this.lowerExpr(expr.kind.expr);
|
||||
} else {
|
||||
this.program.add(Ops.PushNull);
|
||||
|
Loading…
Reference in New Issue
Block a user