aboutsummaryrefslogtreecommitdiff
path: root/core/operators.nom
diff options
context:
space:
mode:
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))"