diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-09-17 09:25:03 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-09-17 09:25:03 -0400 |
commit | 730ead608f04d4306a782cc5c3a895557de46274 (patch) | |
tree | d1dfd2941652183729757ea8648d7e598a5ae3b2 | |
parent | 24f99305fcda201f67c8de846bb2d683011099b7 (diff) |
Print char patterns in C
-rw-r--r-- | src/cjr_print.sml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml index 538e53f2..9f337b5b 100644 --- a/src/cjr_print.sml +++ b/src/cjr_print.sml @@ -193,6 +193,19 @@ fun p_pat (env, exit, depth) (p, loc) = 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) => |