comparison src/corify.sml @ 1073:b2311dfb3158

Initializers and setval
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Dec 2009 14:20:41 -0500
parents e46227efcbba
children 0657e5adc938
comparison
equal deleted inserted replaced
1072:9001966ae1c8 1073:b2311dfb3158
1062 val s = relify (doRestify Settings.Style (mods, x)) 1062 val s = relify (doRestify Settings.Style (mods, x))
1063 in 1063 in
1064 ([(L'.DStyle (x, n, s), loc)], st) 1064 ([(L'.DStyle (x, n, s), loc)], st)
1065 end 1065 end
1066 1066
1067 | L.DInitializer e =>
1068 ([(L'.DInitializer (corifyExp st e), loc)], st)
1069
1067 and corifyStr mods ((str, _), st) = 1070 and corifyStr mods ((str, _), st) =
1068 case str of 1071 case str of
1069 L.StrConst ds => 1072 L.StrConst ds =>
1070 let 1073 let
1071 val st = St.enter (st, mods) 1074 val st = St.enter (st, mods)
1118 | L.DTable (_, _, n', _, _, _, _, _) => Int.max (n, n') 1121 | L.DTable (_, _, n', _, _, _, _, _) => Int.max (n, n')
1119 | L.DSequence (_, _, n') => Int.max (n, n') 1122 | L.DSequence (_, _, n') => Int.max (n, n')
1120 | L.DView (_, _, n', _, _) => Int.max (n, n') 1123 | L.DView (_, _, n', _, _) => Int.max (n, n')
1121 | L.DDatabase _ => n 1124 | L.DDatabase _ => n
1122 | L.DCookie (_, _, n', _) => Int.max (n, n') 1125 | L.DCookie (_, _, n', _) => Int.max (n, n')
1123 | L.DStyle (_, _, n') => Int.max (n, n')) 1126 | L.DStyle (_, _, n') => Int.max (n, n')
1127 | L.DInitializer _ => n)
1124 0 ds 1128 0 ds
1125 1129
1126 and maxNameStr (str, _) = 1130 and maxNameStr (str, _) =
1127 case str of 1131 case str of
1128 L.StrConst ds => maxName ds 1132 L.StrConst ds => maxName ds