about summary refs log tree commit diff
path: root/tvix/eval/src
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-01T14·14+0300
committertazjin <tazjin@tvl.su>2022-09-07T19·23+0000
commitd8f494b50b03760f69490ecc6d1f02c62937449b (patch)
treed062e7695b40fc98431b96eda61ca837efec489c /tvix/eval/src
parent2ad89a00fbabaade066a276cba4f041690f14d74 (diff)
feat(tvix/eval): track source spans for literal identifiers r/4719
Change-Id: I7ca08c6c0124f653e55fcc86413a847f0a4c50c5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6386
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src')
-rw-r--r--tvix/eval/src/compiler/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index c99415d845b9..2c2576702e76 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