diff options
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/js/statement.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/js/statement.jvm.lux | 9 |
1 files changed, 4 insertions, 5 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 e430d22ae..a2c0c6510 100644 --- a/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux @@ -6,7 +6,8 @@ (luxc (lang [".L" module])) [//] (// [".T" runtime] - [".T" reference])) + [".T" reference] + [".T" eval])) (def: #export (translate-def name expressionT expressionJS metaV) (-> Text Type //.Expression Code (Meta Unit)) @@ -22,10 +23,8 @@ _ (do @ - [#let [def-name (referenceT.global def-ident)] - ## _ (hostT.save (format "var " def-name " = " expressionJS ";")) - #let [expressionV (: Top [])] - ## expressionV (hostT.eval def-name) + [_ (//.save-definition def-ident expressionJS) + expressionV (evalT.eval (referenceT.global def-ident)) _ (moduleL.define def-ident [expressionT metaV expressionV]) _ (if (macro.type? metaV) (case (macro.declared-tags metaV) |