diff src/monoize.sml @ 154:e2b185379592

HTML select
author Adam Chlipala <adamc@hcoop.net>
date Thu, 24 Jul 2008 11:16:54 -0400
parents cfe6f9db74aa
children 4334bb734187
line wrap: on
line diff
--- a/src/monoize.sml	Thu Jul 24 11:10:23 2008 -0400
+++ b/src/monoize.sml	Thu Jul 24 11:16:54 2008 -0400
@@ -329,6 +329,20 @@
                          normal ("input",
                                  SOME (L'.EPrim (Prim.String (" type=\"radio\" name=\"" ^ name ^ "\"")), loc)))
 
+                  | "lselect" =>
+                    (case targs of
+                         [_, (L.CName name, _)] =>
+                         (L'.EStrcat ((L'.EStrcat (tagStart "select",
+                                                   (L'.EPrim (Prim.String (" name=\"" ^ name ^ "\">")), loc)), loc),
+                                      (L'.EStrcat (monoExp (env, st) xml,
+                                                   (L'.EPrim (Prim.String "</select>"),
+                                                    loc)), loc)),
+                          loc)
+                       | _ => (Print.prefaces "Targs" (map (fn t => ("T", CorePrint.p_con env t)) targs);
+                               raise Fail "No name passed to lselect tag"))
+
+                  | "loption" => normal ("option", NONE)
+
                   | _ => normal (tag, NONE)
             end