From d8f494b50b03760f69490ecc6d1f02c62937449b Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 1 Sep 2022 17:14:31 +0300 Subject: feat(tvix/eval): track source spans for literal identifiers Change-Id: I7ca08c6c0124f653e55fcc86413a847f0a4c50c5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6386 Tested-by: BuildkiteCI Reviewed-by: sterni --- tvix/eval/src/compiler/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tvix/eval/src') diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index c99415d845..2c2576702e 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -988,7 +988,10 @@ impl Compiler<'_> { /// several operations related to attribute sets, where /// identifiers are used as string keys. fn emit_literal_ident(&mut self, ident: &ast::Ident) { - self.emit_constant_old(Value::String(ident.ident_token().unwrap().text().into())); + self.emit_constant( + Value::String(ident.ident_token().unwrap().text().into()), + ident, + ); } /// Patch the jump instruction at the given index, setting its -- cgit 1.4.1