comparison src/jscomp.sml @ 1111:e1d738870086

JavaScript urlification; more lenient export pattern in Corify; only include scripts in pages that use JavaScript
author Adam Chlipala <adamc@hcoop.net>
date Sat, 02 Jan 2010 14:54:15 -0500
parents b2311dfb3158
children 7a31e0cf25e9
comparison
equal deleted inserted replaced
1110:7fc4e0087e50 1111:e1d738870086
867 | EClosure _ => unsupported "EClosure" 867 | EClosure _ => unsupported "EClosure"
868 | EQuery _ => unsupported "Query" 868 | EQuery _ => unsupported "Query"
869 | EDml _ => unsupported "DML" 869 | EDml _ => unsupported "DML"
870 | ENextval _ => unsupported "Nextval" 870 | ENextval _ => unsupported "Nextval"
871 | ESetval _ => unsupported "Nextval" 871 | ESetval _ => unsupported "Nextval"
872 | EUnurlify _ => unsupported "EUnurlify"
873 | EReturnBlob _ => unsupported "EUnurlify" 872 | EReturnBlob _ => unsupported "EUnurlify"
874 | ERedirect _ => unsupported "ERedirect" 873 | ERedirect _ => unsupported "ERedirect"
874
875 | EUnurlify (e, t) =>
876 let
877 val (e, st) = jsE inner (e, st)
878 val (e', st) = unurlifyExp loc (t, st)
879 in
880 (strcat [str ("{c:\"f\",f:\"unurlify\",a:cons({c:\"c\",v:function(s){var t=s.split(\"/\");var i=0;return "
881 ^ e' ^ "}},cons("),
882 e,
883 str ",null))}"],
884 st)
885 end
875 886
876 | ESignalReturn e => 887 | ESignalReturn e =>
877 let 888 let
878 val (e, st) = jsE inner (e, st) 889 val (e, st) = jsE inner (e, st)
879 in 890 in