feat(tvix/eval): track source spans for strings

Change-Id: I29e6c7f9e25d1b2e6bafa602c463eb9ccee2131b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6382
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2022-09-01 17:05:27 +03:00 committed by tazjin
parent 3c4eed9b76
commit f14b368514

View file

@ -237,13 +237,13 @@ impl Compiler<'_> {
ast::InterpolPart::Interpolation(node) => self.compile(slot, node.expr().unwrap()),
ast::InterpolPart::Literal(lit) => {
self.emit_constant_old(Value::String(lit.into()));
self.emit_constant(Value::String(lit.into()), &node);
}
}
}
if count != 1 {
self.push_op_old(OpCode::OpInterpolate(Count(count)));
self.push_op(OpCode::OpInterpolate(Count(count)), &node);
}
}