diff options
Diffstat (limited to 'tvix/eval/src/compiler/scope.rs')
-rw-r--r-- | tvix/eval/src/compiler/scope.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/eval/src/compiler/scope.rs b/tvix/eval/src/compiler/scope.rs index a50b3b79343e..7d557a7d2fd3 100644 --- a/tvix/eval/src/compiler/scope.rs +++ b/tvix/eval/src/compiler/scope.rs @@ -104,6 +104,10 @@ pub struct Upvalue { #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd)] pub struct LocalIdx(usize); +impl LocalIdx { + pub const ZERO: LocalIdx = LocalIdx(0); +} + /// Represents a scope known during compilation, which can be resolved /// directly to stack indices. /// |