feat(tvix/eval): track source spans for with expressions

Change-Id: I1d58ce548b5b47e967928e85bb64acf5ed69ecc8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6395
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2022-09-01 17:48:43 +03:00 committed by tazjin
parent 9f5f85a1c1
commit 20996601ea

View file

@ -836,11 +836,11 @@ impl Compiler<'_> {
self.scope_mut().push_with();
self.push_op_old(OpCode::OpPushWith(with_idx));
self.push_op(OpCode::OpPushWith(with_idx), &node);
self.compile(slot, node.body().unwrap());
self.push_op_old(OpCode::OpPopWith);
self.push_op(OpCode::OpPopWith, &node);
self.scope_mut().pop_with();
self.end_scope();
}