aboutsummaryrefslogtreecommitdiff
path: root/lux-js
diff options
context:
space:
mode:
authorEduardo Julian2020-07-14 03:55:43 -0400
committerEduardo Julian2020-07-14 03:55:43 -0400
commitde1d6adc6657feb81332db8620094dd8de150b96 (patch)
tree372ca3d12277c859b276fd57e1b5ac94c0b5eefd /lux-js
parent6346bc55f8b62b48253369fa1f28b93d6500e885 (diff)
Mo' fixes, less problems.
Diffstat (limited to '')
-rw-r--r--lux-js/source/program.lux22
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)