diff options
Diffstat (limited to 'lux-lua/source')
-rw-r--r-- | lux-lua/source/program.lux | 25 |
1 files changed, 14 insertions, 11 deletions
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) |