diff src/cjr_print.sml @ 387:7abb28e9d51f

Binops; equality tested on int; lame 404 substitute
author Adam Chlipala <adamc@hcoop.net>
date Tue, 21 Oct 2008 09:50:19 -0400
parents 168667cdaa95
children acaf9d19fbb7
line wrap: on
line diff
--- a/src/cjr_print.sml	Sun Oct 19 16:49:09 2008 -0400
+++ b/src/cjr_print.sml	Tue Oct 21 09:50:19 2008 -0400
@@ -609,6 +609,25 @@
                           p_list_sep (box [string ",", space]) (p_exp env) args,
                           string ")"])
 
+      | EUnop (s, e1) =>
+        parenIf par (box [string s,
+                          space,
+                          p_exp' true env e1])
+
+      | EBinop ("!strcmp", e1, e2) =>
+        box [string "!strcmp(",
+             p_exp env e1,
+             string ",",
+             space,
+             p_exp env e2,
+             string ")"]
+      | EBinop (s, e1, e2) =>
+        parenIf par (box [p_exp' true env e1,
+                          space,
+                          string s,
+                          space,
+                          p_exp' true env e2])
+
       | ERecord (i, xes) => box [string "({",
                                  space,
                                  string "struct",
@@ -2060,6 +2079,8 @@
              newline,
              p_list_sep newline (fn x => x) pds',
              newline,
+             string "uw_error(ctx, FATAL, \"Unknown page\");",
+             newline,
              string "}",
              newline,
              newline,