aboutsummaryrefslogtreecommitdiff
path: root/lux-lua
diff options
context:
space:
mode:
Diffstat (limited to 'lux-lua')
-rw-r--r--lux-lua/commands.md6
-rw-r--r--lux-lua/source/program.lux25
2 files changed, 15 insertions, 16 deletions
diff --git a/lux-lua/commands.md b/lux-lua/commands.md
index 7e9de2daa..6ba400775 100644
--- a/lux-lua/commands.md
+++ b/lux-lua/commands.md
@@ -1,7 +1,3 @@
-# Notes
-
-* TODO: Switch to [neolua](https://github.com/neolithos/neolua) ASAP. Rembulan is too immature of an implementation.
-
# Test
```
@@ -33,6 +29,6 @@ cd ~/lux/stdlib/ \
```
cd ~/lux/lux-lua/ \
-&& mvn install:install-file -Dfile=target/program.jar -DgroupId=com.github.luxlang -DartifactId=lux-lua -Dversion=0.6.3 -Dpackaging=jar
+&& mvn install:install-file -Dfile=target/program.jar -DgroupId=com.github.luxlang -DartifactId=lux-lua -Dversion=0.6.6-SNAPSHOT -Dpackaging=jar
```
diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux
index 66620007d..b588fa732 100644
--- a/lux-lua/source/program.lux
+++ b/lux-lua/source/program.lux
@@ -312,17 +312,20 @@
(def: (call_macro [state_context executor] inputs lux macro)
(-> Baggage (List Code) Lux net/sandius/rembulan/runtime/LuaFunction (Try Any))
(do try.monad
- [output (net/sandius/rembulan/exec/DirectCallExecutor::call state_context
- (:as java/lang/Object macro)
- (|> (array.empty 2)
- (array.write! 0 ... (:as java/lang/Object inputs)
- ... (net/sandius/rembulan/impl/ImmutableTable$Builder::build (net/sandius/rembulan/impl/ImmutableTable$Builder::new))
- (:as java/lang/Object (lux_structure (:as (Array java/lang/Object) inputs))))
- (array.write! 1 ... (:as java/lang/Object lux)
- ... (net/sandius/rembulan/impl/ImmutableTable$Builder::build (net/sandius/rembulan/impl/ImmutableTable$Builder::new))
- (:as java/lang/Object (lux_structure (:as (Array java/lang/Object) lux)))))
- executor)]
- (|> output (array.read! 0) maybe.trusted (:as java/lang/Object) ..read)))
+ [.let [inputs (: (ffi.type [java/lang/Object])
+ (|> (array.empty 2)
+ (array.write! 0 ... (:as java/lang/Object inputs)
+ ... (net/sandius/rembulan/impl/ImmutableTable$Builder::build (net/sandius/rembulan/impl/ImmutableTable$Builder::new))
+ (:as java/lang/Object (lux_structure (:as (Array java/lang/Object) inputs))))
+ (array.write! 1 ... (:as java/lang/Object lux)
+ ... (net/sandius/rembulan/impl/ImmutableTable$Builder::build (net/sandius/rembulan/impl/ImmutableTable$Builder::new))
+ (:as java/lang/Object (lux_structure (:as (Array java/lang/Object) lux))))))]
+ output (net/sandius/rembulan/exec/DirectCallExecutor::call state_context (:as java/lang/Object macro) inputs executor)]
+ (|> output
+ (array.read! 0)
+ maybe.trusted
+ (:as java/lang/Object)
+ ..read)))
(def: (expander baggage macro inputs lux)
(-> Baggage Expander)