From 2ec51eee557b7a70a2e19e2d86b86e478ab24d52 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 21 Feb 2018 23:50:39 -0400 Subject: - Changed the format for variants in JS. - Fixed a bug when decoding fracs. --- new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/js/procedure') diff --git a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux index ce79bda35..685043b83 100644 --- a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux @@ -296,8 +296,8 @@ (def: (frac//decode inputJS) Unary (let [decoding (format "parseFloat(" inputJS ")") - thunk (format "(function () {" decoding "}")] - (lux//try decoding))) + thunk (self-contained (format "function () { return " decoding "; }"))] + (lux//try thunk))) (do-template [ ] [(def: ( inputJS) -- cgit v1.2.3