diff options
author | 2010-02-28 15:46:41 -0500 | |
---|---|---|
committer | 2010-02-28 15:46:41 -0500 | |
commit | 5bfa75dbe0910dd19a8e0f40e2d03e33a4c44eb8 (patch) | |
tree | 4aeca801868850579ec9ac59cefcf4a5ed6bf25f /src/monoize.sml | |
parent | 704a9de8fe5e35ba24185048cf990456141a8bc0 (diff) |
Fix parsing of space-free .urp directives; use 'class' for 'c*' tags
Diffstat (limited to 'src/monoize.sml')
-rw-r--r-- | src/monoize.sml | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index 0e122c29..a5dc3929 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -2787,12 +2787,28 @@ fun monoExp (env, st, fm) (all as (e, loc)) = (L'.EJavaScript (L'.Script, e), loc), str ");"])) attrs + + val t = (L'.TFfi ("Basis", "string"), loc) + val setClass = (L'.ECase (class, + [((L'.PNone t, loc), + str ""), + ((L'.PSome (t, (L'.PVar ("x", t), loc)), loc), + (L'.EStrcat ((L'.EPrim (Prim.String "d.className=\""), loc), + (L'.EStrcat ((L'.ERel 0, loc), + (L'.EPrim (Prim.String "\";"), loc)), loc)), + loc))], + {disc = (L'.TOption t, loc), + result = t}), loc) in case assgns of - [] => jexp + [] => strcat [str "var d=", + jexp, + str ";", + setClass] | _ => strcat (str "var d=" :: jexp :: str ";" + :: setClass :: assgns) end |