diff options
Diffstat (limited to 'tvix/eval/src/chunk.rs')
-rw-r--r-- | tvix/eval/src/chunk.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tvix/eval/src/chunk.rs b/tvix/eval/src/chunk.rs index 04b58bde20fd..86d78cbe6343 100644 --- a/tvix/eval/src/chunk.rs +++ b/tvix/eval/src/chunk.rs @@ -65,6 +65,11 @@ impl Chunk { CodeIdx(idx) } + /// Get the first span of a chunk, no questions asked. + pub fn first_span(&self) -> codemap::Span { + self.spans[0].span + } + /// Pop the last operation from the chunk and clean up its tracked /// span. Used when the compiler backtracks. pub fn pop_op(&mut self) { |