diff options
Diffstat (limited to 'lux-js')
-rw-r--r-- | lux-js/source/program.lux | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux index bd7dded23..18b31c415 100644 --- a/lux-js/source/program.lux +++ b/lux-js/source/program.lux @@ -501,16 +501,17 @@ (do try.monad [handler (try.from-maybe (..ensure-macro (:coerce Macro handler))) #let [to-js (: (-> Any java/lang/Object) - (|>> (:coerce (Array java/lang/Object)) js-structure (:coerce java/lang/Object)))]] - (jdk/nashorn/api/scripting/JSObject::call #.None - (|> (array.new 2) - (: (Array java/lang/Object)) - (array.write 0 (to-js name)) - (array.write 1 (to-js phase)) - (array.write 2 (to-js archive)) - (array.write 3 (to-js parameters)) - (array.write 4 (to-js state))) - (:coerce jdk/nashorn/api/scripting/JSObject handler))))) + (|>> (:coerce (Array java/lang/Object)) js-structure (:coerce java/lang/Object)))] + output (jdk/nashorn/api/scripting/JSObject::call #.None + (|> (array.new 5) + (: (Array java/lang/Object)) + (array.write 0 name) + (array.write 1 (to-js phase)) + (array.write 2 (to-js archive)) + (array.write 3 (to-js parameters)) + (array.write 4 (to-js state))) + (:coerce jdk/nashorn/api/scripting/JSObject handler))] + (lux-object (:coerce java/lang/Object output))))) (def: (declare-success! _) (-> Any (Promise Any)) @@ -528,6 +529,7 @@ generation.bundle extension/bundle.empty (..program reference.artifact) + [(& Register Text) _.Expression _.Statement] ..extender service [(packager.package _.use-strict _.code _.then) |