diff options
author | Eduardo Julian | 2017-05-19 23:54:16 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-05-19 23:54:16 -0400 |
commit | b81f241bd90092f52a47f64f4dc8297cc4f82f56 (patch) | |
tree | a07f20ec91597ca98e66833e14c42accf6b169f7 /new-luxc/source/luxc/env.lux | |
parent | a73037f8ab46e31196b1257d7621ceeacb1cad38 (diff) |
- WIP: Added pattern-matching (case) analysis.
Diffstat (limited to '')
-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)])))) |