aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-02-23 23:10:28 -0400
committerEduardo Julian2018-02-23 23:10:28 -0400
commit0bd93d82eb7a50b9ce8be42800c388e87e6ca9bf (patch)
tree847453417dbf6bf76be82efd498074029162d38b /new-luxc/source/luxc/lang/translation/js/statement.jvm.lux
parentc8e2898611fa759cbe7c2ac84738b5b403575664 (diff)
- Added a code-generation utility module for JS.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/js/statement.jvm.lux7
1 files changed, 4 insertions, 3 deletions
diff --git a/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux
index a2c0c6510..7bcd8e112 100644
--- a/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux
@@ -3,14 +3,15 @@
(lux (control [monad #+ do])
[macro]
(data text/format))
- (luxc (lang [".L" module]))
+ (luxc (lang [".L" module]
+ (host [js #+ JS Expression Statement])))
[//]
(// [".T" runtime]
[".T" reference]
[".T" eval]))
(def: #export (translate-def name expressionT expressionJS metaV)
- (-> Text Type //.Expression Code (Meta Unit))
+ (-> Text Type Expression Code (Meta Unit))
(do macro.Monad<Meta>
[current-module macro.current-module-name
#let [def-ident [current-module name]]]
@@ -39,7 +40,7 @@
)))
(def: #export (translate-program programJS)
- (-> //.Expression (Meta //.Statement))
+ (-> Expression (Meta Statement))
(macro.fail "translate-program NOT IMPLEMENTED YET")
## (hostT.save (format "var " (referenceT.variable +0) " = " runtimeT.lux//program-args "();"
## "(" programJS ")(null);"))