diff src/cjr_print.sml @ 947:e2305dcc3965

Print char patterns in C
author Adam Chlipala <adamc@hcoop.net>
date Thu, 17 Sep 2009 09:25:03 -0400
parents be6585b4058b
children 166ea3944b91
line wrap: on
line diff
--- a/src/cjr_print.sml	Tue Sep 15 16:27:24 2009 -0400
+++ b/src/cjr_print.sml	Thu Sep 17 09:25:03 2009 -0400
@@ -193,6 +193,19 @@
               space,
               exit],
          env)
+      | PPrim (Prim.Char ch) =>
+        (box [string "if",
+              space,
+              string "(disc",
+              string (Int.toString depth),
+              space,
+              string "!=",
+              space,
+              Prim.p_t_GCC (Prim.Char ch),
+              string ")",
+              space,
+              exit],
+         env)
       | PPrim _ => raise Fail "CjrPrint: Disallowed PPrim primitive"
 
       | PCon (dk, pc, po) =>