diff options
author | Vincent Ambo <mail@tazj.in> | 2022-09-01T13·58+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-07T19·23+0000 |
commit | eaf7af18be44234a682e201b721dfb90c8d9fcca (patch) | |
tree | 9fbd1abd358e491a05863b7e1de9f7e4c9ef5200 | |
parent | 72adcdf9652d75f9499e311beec128f9e3627301 (diff) |
feat(tvix/eval): track source spans for literals r/4713
Change-Id: Icfe77f85c4f65b6bf28b8752c2795419e8e396ce Reviewed-on: https://cl.tvl.fyi/c/depot/+/6380 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
-rw-r--r-- | tvix/eval/src/compiler/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index e8eb14ed15a4..f80a23935bcf 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -171,15 +171,15 @@ impl Compiler<'_> { fn compile_literal(&mut self, node: ast::Literal) { match node.kind() { ast::LiteralKind::Float(f) => { - self.emit_constant_old(Value::Float(f.value().unwrap())); + self.emit_constant(Value::Float(f.value().unwrap()), &node); } ast::LiteralKind::Integer(i) => { - self.emit_constant_old(Value::Integer(i.value().unwrap())); + self.emit_constant(Value::Integer(i.value().unwrap()), &node); } ast::LiteralKind::Uri(u) => { self.emit_warning(node.syntax().clone(), WarningKind::DeprecatedLiteralURL); - self.emit_constant_old(Value::String(u.syntax().text().into())); + self.emit_constant(Value::String(u.syntax().text().into()), &node); } } } |