feat(tvix/eval): track source spans for let bindings

Change-Id: I9457917277a7fdd8bdbe227a567b28969312d06e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6393
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2022-09-01 17:43:46 +03:00 committed by tazjin
parent 7f687f0e99
commit f37e4a0b9c

View file

@ -687,7 +687,7 @@ impl Compiler<'_> {
self.emit_force();
self.emit_literal_ident(&ident);
self.push_op_old(OpCode::OpAttrsSelect);
self.push_op(OpCode::OpAttrsSelect, &ident);
let idx = self.declare_local(
ident.syntax().clone(),
ident.ident_token().unwrap().text(),
@ -747,7 +747,7 @@ impl Compiler<'_> {
for idx in indices {
if self.scope()[idx].needs_finaliser {
let stack_idx = self.scope().stack_index(idx);
self.push_op_old(OpCode::OpFinalise(stack_idx));
self.push_op(OpCode::OpFinalise(stack_idx), &node);
}
}