diff src/core_util.sml @ 718:f152f215a02c

style declarations
author Adam Chlipala <adamc@hcoop.net>
date Sun, 12 Apr 2009 10:08:11 -0400
parents d8217b4cb617
children acb8537f58f0
line wrap: on
line diff
--- a/src/core_util.sml	Thu Apr 09 16:36:50 2009 -0400
+++ b/src/core_util.sml	Sun Apr 12 10:08:11 2009 -0400
@@ -951,6 +951,10 @@
                 S.map2 (mfc ctx c,
                      fn c' =>
                         (DCookie (x, n, c', s), loc))
+              | DStyle (x, n, c, s) =>
+                S.map2 (mfc ctx c,
+                     fn c' =>
+                        (DStyle (x, n, c', s), loc))
 
         and mfvi ctx (x, n, t, e, s) =
             S.bind2 (mfc ctx t,
@@ -1088,6 +1092,12 @@
                                         in
                                             bind (ctx, NamedE (x, n, t, NONE, s))
                                         end
+                                      | DStyle (x, n, c, s) =>
+                                        let
+                                            val t = (CApp ((CFfi ("Basis", "css_class"), #2 d'), c), #2 d')
+                                        in
+                                            bind (ctx, NamedE (x, n, t, NONE, s))
+                                        end
                             in
                                 S.map2 (mff ctx' ds',
                                      fn ds' =>
@@ -1148,7 +1158,8 @@
                           | DTable (_, n, _, _, _, _, _, _) => Int.max (n, count)
                           | DSequence (_, n, _) => Int.max (n, count)
                           | DDatabase _ => count
-                          | DCookie (_, n, _, _) => Int.max (n, count)) 0
+                          | DCookie (_, n, _, _) => Int.max (n, count)
+                          | DStyle (_, n, _, _) => Int.max (n, count)) 0
               
 end