aboutsummaryrefslogtreecommitdiff
path: root/core/operators.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-06-20 15:22:03 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-06-20 15:22:06 -0700
commitd73cbf0aa5c9081d965e06822f4958aa5c1871e6 (patch)
tree776740bfa4b47bd7983efd3d332da3c14b97bb49 /core/operators.nom
parentc1cec2ac8487bf7486b1ab85d24252d6658b3dfc (diff)
Cleanups.
Diffstat (limited to 'core/operators.nom')
-rw-r--r--core/operators.nom10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/operators.nom b/core/operators.nom
index 0756751..c81760d 100644
--- a/core/operators.nom
+++ b/core/operators.nom
@@ -130,6 +130,16 @@ compile [with %assignments %body] to
\%lua
end -- 'with' block
+compile [local %var_or_vars] to
+ %lua <- (Lua "")
+ lua> ".."
+ if \%var_or_vars.type == "List" then
+ \%lua:add_free_vars(table.map(\%var_or_vars, function(v) return tostring(nomsu:compile(v)) end))
+ else
+ \%lua:add_free_vars({tostring(nomsu:compile(\%var_or_vars))})
+ end
+ return %lua
+
# Math Operators
compile [%x wrapped around %y, %x mod %y] to: Lua value "(\(%x as lua expr) % \(%y as lua expr))"