Mercurial > urweb
comparison src/monoize.sml @ 1173:983d9b38abc7
Fix parsing of space-free .urp directives; use 'class' for 'c*' tags
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 28 Feb 2010 15:46:41 -0500 |
parents | 69f1d39d3f2d |
children | 51e596feec37 |
comparison
equal
deleted
inserted
replaced
1172:ad15700272f6 | 1173:983d9b38abc7 |
---|---|
2785 | (x, e, _) => | 2785 | (x, e, _) => |
2786 SOME (strcat [str ("d." ^ lowercaseFirst x ^ "=exec("), | 2786 SOME (strcat [str ("d." ^ lowercaseFirst x ^ "=exec("), |
2787 (L'.EJavaScript (L'.Script, e), loc), | 2787 (L'.EJavaScript (L'.Script, e), loc), |
2788 str ");"])) | 2788 str ");"])) |
2789 attrs | 2789 attrs |
2790 | |
2791 val t = (L'.TFfi ("Basis", "string"), loc) | |
2792 val setClass = (L'.ECase (class, | |
2793 [((L'.PNone t, loc), | |
2794 str ""), | |
2795 ((L'.PSome (t, (L'.PVar ("x", t), loc)), loc), | |
2796 (L'.EStrcat ((L'.EPrim (Prim.String "d.className=\""), loc), | |
2797 (L'.EStrcat ((L'.ERel 0, loc), | |
2798 (L'.EPrim (Prim.String "\";"), loc)), loc)), | |
2799 loc))], | |
2800 {disc = (L'.TOption t, loc), | |
2801 result = t}), loc) | |
2790 in | 2802 in |
2791 case assgns of | 2803 case assgns of |
2792 [] => jexp | 2804 [] => strcat [str "var d=", |
2805 jexp, | |
2806 str ";", | |
2807 setClass] | |
2793 | _ => strcat (str "var d=" | 2808 | _ => strcat (str "var d=" |
2794 :: jexp | 2809 :: jexp |
2795 :: str ";" | 2810 :: str ";" |
2811 :: setClass | |
2796 :: assgns) | 2812 :: assgns) |
2797 end | 2813 end |
2798 | 2814 |
2799 fun execify e = | 2815 fun execify e = |
2800 case e of | 2816 case e of |