summaryrefslogtreecommitdiff
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-10-21 10:34:07 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-10-21 10:34:07 -0400
commit29a7ea8ff27061917f6e5352f9d1eb8ccad7c680 (patch)
tree3d036341a8a7ed2f181f8f773b7df9e97ae2eda8 /src/cjr_print.sml
parentcbebf68dfc1e18c0477d20ea3b424ea2c97c8728 (diff)
num working for int
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index 5f430ccf..e0441425 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -614,19 +614,20 @@ fun p_exp' par env (e, loc) =
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])
+ if Char.isAlpha (String.sub (s, size s - 1)) then
+ box [string s,
+ p_exp env e1,
+ string ",",
+ space,
+ p_exp env e2,
+ string ")"]
+ else
+ parenIf par (box [p_exp' true env e1,
+ space,
+ string s,
+ space,
+ p_exp' true env e2])
| ERecord (i, xes) => box [string "({",
space,