summaryrefslogtreecommitdiff
path: root/src/eval/mod.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-14 22:33:22 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-14 22:34:43 +0100
commit2a86e4db0bb3894d1cc3b94e1a1af31a6cd87b80 (patch)
treed5c0954ef779689c40eb9b2f58d477869546ea89 /src/eval/mod.rs
parente50189cfa75d83ea1b74b1dc2cf1fc9c01f8c825 (diff)
Reference supplements
Diffstat (limited to 'src/eval/mod.rs')
-rw-r--r--src/eval/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/eval/mod.rs b/src/eval/mod.rs
index ae5f668a..127c930f 100644
--- a/src/eval/mod.rs
+++ b/src/eval/mod.rs
@@ -567,7 +567,9 @@ impl Eval for ast::Ref {
type Output = Content;
fn eval(&self, vm: &mut Vm) -> SourceResult<Self::Output> {
- Ok((vm.items.ref_)(Label(self.get().into())))
+ let label = Label(self.target().into());
+ let supplement = self.supplement().map(|block| block.eval(vm)).transpose()?;
+ Ok((vm.items.reference)(label, supplement))
}
}