From 0bd93d82eb7a50b9ce8be42800c388e87e6ca9bf Mon Sep 17 00:00:00 2001
From: Eduardo Julian
Date: Fri, 23 Feb 2018 23:10:28 -0400
Subject: - Added a code-generation utility module for JS.
---
new-luxc/source/luxc/lang/translation/js/structure.jvm.lux | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
(limited to 'new-luxc/source/luxc/lang/translation/js/structure.jvm.lux')
diff --git a/new-luxc/source/luxc/lang/translation/js/structure.jvm.lux b/new-luxc/source/luxc/lang/translation/js/structure.jvm.lux
index 54f578bee..df7215dba 100644
--- a/new-luxc/source/luxc/lang/translation/js/structure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/structure.jvm.lux
@@ -5,12 +5,13 @@
text/format)
[macro])
(luxc ["&" lang]
- (lang [synthesis #+ Synthesis]))
+ (lang [synthesis #+ Synthesis]
+ (host [js #+ JS Expression Statement])))
[//]
(// [".T" runtime]))
(def: #export (translate-tuple translate elemsS+)
- (-> (-> Synthesis (Meta //.Expression)) (List Synthesis) (Meta //.Expression))
+ (-> (-> Synthesis (Meta Expression)) (List Synthesis) (Meta Expression))
(case elemsS+
#.Nil
(:: macro.Monad wrap runtimeT.unit)
@@ -24,7 +25,7 @@
(wrap (format "[" (text.join-with "," elemsT+) "]")))))
(def: #export (translate-variant translate tag tail? valueS)
- (-> (-> Synthesis (Meta //.Expression)) Nat Bool Synthesis (Meta //.Expression))
+ (-> (-> Synthesis (Meta Expression)) Nat Bool Synthesis (Meta Expression))
(do macro.Monad
[valueT (translate valueS)]
(wrap (runtimeT.variant tag tail? valueT))))
--
cgit v1.2.3