summaryrefslogtreecommitdiff
path: root/src/core_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-12 10:08:11 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-12 10:08:11 -0400
commit30eeaff2c92fb1d0ba029a7688fc7b547a60c150 (patch)
treea661373caf0683dea44543b9997278159a574d1b /src/core_util.sml
parent17cb59d373d1a94731d3730b938776b524d9f81c (diff)
style declarations
Diffstat (limited to 'src/core_util.sml')
-rw-r--r--src/core_util.sml13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core_util.sml b/src/core_util.sml
index 320a0326..8ccd520a 100644
--- a/src/core_util.sml
+++ b/src/core_util.sml
@@ -951,6 +951,10 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, decl = fd, bind} =
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 @@ fun mapfoldB (all as {bind, ...}) =
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 @@ val maxName = foldl (fn ((d, _) : decl, count) =>
| 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