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/statement.jvm.lux | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/js/statement.jvm.lux') 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 [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);")) -- cgit v1.2.3