feat(tvix/eval): track source spans for literals
Change-Id: Icfe77f85c4f65b6bf28b8752c2795419e8e396ce Reviewed-on: https://cl.tvl.fyi/c/depot/+/6380 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
72adcdf965
commit
eaf7af18be
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue