summaryrefslogtreecommitdiff
path: root/src/jscomp.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/jscomp.sml')
-rw-r--r--src/jscomp.sml12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/jscomp.sml b/src/jscomp.sml
index 2c00e04c..cd08cc0d 100644
--- a/src/jscomp.sml
+++ b/src/jscomp.sml
@@ -1186,6 +1186,18 @@ fun process file =
((EUnurlify (e, t, b), loc), st)
end
+ | EJavaScript (m as Source t, e') =>
+ (foundJavaScript := true;
+ let
+ val (x', st) = jsExp m (t :: outer) ((ERel 0, loc), st)
+ in
+ ((ELet ("x", t, e', x'), loc), st)
+ end
+ handle CantEmbed t => ((*ErrorMsg.errorAt loc "Unable to embed type in JavaScript";
+ Print.preface ("Type",
+ MonoPrint.p_typ MonoEnv.empty t);*)
+ (e, st)))
+
| EJavaScript (m, e') =>
(foundJavaScript := true;
jsExp m outer (e', st)