diff options
Diffstat (limited to 'new-luxc/source/luxc/env.lux')
-rw-r--r-- | new-luxc/source/luxc/env.lux | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/env.lux b/new-luxc/source/luxc/env.lux index edc6a4a5b..e15e01130 100644 --- a/new-luxc/source/luxc/env.lux +++ b/new-luxc/source/luxc/env.lux @@ -146,3 +146,13 @@ output]) )) )) + +(def: #export next-local + (Lux Nat) + (function [compiler] + (case (get@ #;scopes compiler) + #;Nil + (#R;Error "Cannot get next reference when there is no scope.") + + (#;Cons top _) + (#R;Success [compiler (get@ [#;locals #;counter] top)])))) |