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 <sternenseemann@systemli.org>
This commit is contained in:
parent
2ad89a00fb
commit
d8f494b50b
1 changed files with 4 additions and 1 deletions
|
@ -988,7 +988,10 @@ impl Compiler<'_> {
|
||||||
/// several operations related to attribute sets, where
|
/// several operations related to attribute sets, where
|
||||||
/// identifiers are used as string keys.
|
/// identifiers are used as string keys.
|
||||||
fn emit_literal_ident(&mut self, ident: &ast::Ident) {
|
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
|
/// Patch the jump instruction at the given index, setting its
|
||||||
|
|
Loading…
Add table
Reference in a new issue