aboutsummaryrefslogtreecommitdiff
path: root/lux-js/source/program.lux
diff options
context:
space:
mode:
Diffstat (limited to 'lux-js/source/program.lux')
-rw-r--r--lux-js/source/program.lux24
1 files changed, 12 insertions, 12 deletions
diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux
index f896219f8..7bc4dd036 100644
--- a/lux-js/source/program.lux
+++ b/lux-js/source/program.lux
@@ -34,14 +34,14 @@
["[0]" file]
["[0]" environment]]
[meta
- ["@" target (.only)
- ["_" js]]
[macro
["^" pattern]
["[0]" template]]
[compiler
[reference
[variable (.only Register)]]
+ ["@" target (.only)
+ ["_" js]]
[language
[lux
[program (.only Program)]
@@ -519,8 +519,8 @@
)
(for @.jvm
- (these (def (evaluate! interpreter alias input)
- (-> javax/script/ScriptEngine unit.ID _.Expression (Try Any))
+ (these (def (evaluate! interpreter input)
+ (-> javax/script/ScriptEngine _.Expression (Try Any))
(do try.monad
[?output (javax/script/ScriptEngine::eval (ffi.as_string (_.code input)) interpreter)]
(when ?output
@@ -544,7 +544,7 @@
(do try.monad
[.let [definition (_.define @global input)]
_ (execute! interpreter definition)
- value (evaluate! interpreter context @global)]
+ value (evaluate! interpreter @global)]
(in [global value definition]))))
(def host
@@ -553,7 +553,7 @@
(org/openjdk/nashorn/api/scripting/NashornScriptEngineFactory::new))]
(is (Host _.Expression _.Statement)
(implementation
- (def (evaluate alias [_ input]) (..evaluate! interpreter alias input))
+ (def (evaluate [_ input]) (..evaluate! interpreter input))
(def execute (..execute! interpreter))
(def (define context custom [_ input]) (..define! interpreter context custom input))
@@ -566,7 +566,7 @@
(def (re_load context custom content)
(do try.monad
[_ (..execute! interpreter content)]
- (..evaluate! interpreter context (_.var (reference.artifact context))))))))))
+ (..evaluate! interpreter (_.var (reference.artifact context))))))))))
)
@.js
@@ -580,8 +580,8 @@
{.#None}
{.#Some return}))))
- (def (evaluate! alias input)
- (-> unit.ID _.Expression (Try Any))
+ (def (evaluate! input)
+ (-> _.Expression (Try Any))
(do try.monad
[?output (..eval (_.code input))]
(when ?output
@@ -605,14 +605,14 @@
(do try.monad
[.let [definition (_.define @global input)]
_ (..execute! definition)
- value (..evaluate! context @global)]
+ value (..evaluate! @global)]
(in [global value definition]))))
(def host
(IO (Host _.Expression _.Statement))
(io (is (Host _.Expression _.Statement)
(implementation
- (def (evaluate alias [_ input]) (..evaluate! alias input))
+ (def (evaluate [_ input]) (..evaluate! input))
(def execute ..execute!)
(def (define context custom [_ input]) (..define! context custom input))
@@ -625,7 +625,7 @@
(def (re_load context custom content)
(do try.monad
[_ (..execute! content)]
- (..evaluate! context (_.var (reference.artifact context)))))))))
+ (..evaluate! (_.var (reference.artifact context)))))))))
))
(def phase_wrapper