diff options
author | Eduardo Julian | 2017-03-02 18:09:03 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-03-02 18:09:03 -0400 |
commit | 27648dd619f1764ba58ca244e9fd0b017665058d (patch) | |
tree | 38dad680a8a8caf108c31a35bdae4af6d528bd04 | |
parent | 71ce7d944f40b0533c7774aaf75712f1c09afd0b (diff) |
- Fixed a bug in which the value of a loop wasn't being returned.
Diffstat (limited to '')
-rw-r--r-- | luxc/src/lux/compiler/js/lux.clj | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/luxc/src/lux/compiler/js/lux.clj b/luxc/src/lux/compiler/js/lux.clj index e0d5a4247..5c6039d2b 100644 --- a/luxc/src/lux/compiler/js/lux.clj +++ b/luxc/src/lux/compiler/js/lux.clj @@ -91,7 +91,7 @@ register-inits (&/map% compile inits) =body (compile body)] (return (str "(function _loop(" (->> registers (&/|interpose ",") (&/fold str "")) ") {" - =body + (str "return " =body ";") "})(" (->> register-inits (&/|interpose ",") (&/fold str "")) ")")) )) @@ -343,9 +343,7 @@ _ false) - def-type (&a/expr-type* ?body) - ;; _ (&/|log! (string/replace def-js " - ] + def-type (&a/expr-type* ?body)] _ (&&/save-js! ?name def-js) def-value (&&/run-js!+ var-name) _ (&/without-repl-closure |