From b14f95ca68887d9e6cea211b47e04e5ec00c05fa Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 13 Mar 2018 23:28:19 -0400 Subject: - Initial Ruby back-end implementation. --- new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux') 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") -- cgit v1.2.3