aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux11
1 files changed, 4 insertions, 7 deletions
diff --git a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
index b5e2147e0..50b8008dd 100644
--- a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
@@ -19,8 +19,8 @@
(def: (flag value)
(-> Bool Lua)
(if value
- (%t "")
- "null"))
+ (lua.string "")
+ lua.nil))
(def: (variant' tag last? value)
(-> Expression Expression Expression Expression)
@@ -111,7 +111,7 @@
(runtime: (lux//program-args program-args)
(lua.block! (list (lua.local! "inputs" (#.Some none))
- (lua.for-step! "idx" (lua.int 1) (lua.length program-args) (lua.int 1)
+ (lua.for-step! "idx" (lua.length program-args) (lua.int 1) (lua.int -1)
(lua.set! "inputs" (some (lua.array (list (lua.nth "idx" program-args)
"inputs")))))
(lua.return! "inputs"))))
@@ -378,17 +378,14 @@
(lua.block! (list (lua.set! (lua.nth idx array) value)
(lua.return! array)))))
-(runtime: (array//remove array idx)
- (array//put array idx unit))
-
(def: runtime//array
Runtime
(format @@array//sub
@@array//concat
@@array//copy
+ @@array//new
@@array//get
@@array//put
- @@array//remove
))
(def: #export atom//field Text "_lux_atom")