Mercurial > urweb
comparison src/cjr_print.sml @ 389:acaf9d19fbb7
num working for int
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 21 Oct 2008 10:34:07 -0400 |
parents | 7abb28e9d51f |
children | 519366a76603 |
comparison
equal
deleted
inserted
replaced
388:2e93d18daf44 | 389:acaf9d19fbb7 |
---|---|
612 | EUnop (s, e1) => | 612 | EUnop (s, e1) => |
613 parenIf par (box [string s, | 613 parenIf par (box [string s, |
614 space, | 614 space, |
615 p_exp' true env e1]) | 615 p_exp' true env e1]) |
616 | 616 |
617 | EBinop ("!strcmp", e1, e2) => | |
618 box [string "!strcmp(", | |
619 p_exp env e1, | |
620 string ",", | |
621 space, | |
622 p_exp env e2, | |
623 string ")"] | |
624 | EBinop (s, e1, e2) => | 617 | EBinop (s, e1, e2) => |
625 parenIf par (box [p_exp' true env e1, | 618 if Char.isAlpha (String.sub (s, size s - 1)) then |
626 space, | 619 box [string s, |
627 string s, | 620 p_exp env e1, |
628 space, | 621 string ",", |
629 p_exp' true env e2]) | 622 space, |
623 p_exp env e2, | |
624 string ")"] | |
625 else | |
626 parenIf par (box [p_exp' true env e1, | |
627 space, | |
628 string s, | |
629 space, | |
630 p_exp' true env e2]) | |
630 | 631 |
631 | ERecord (i, xes) => box [string "({", | 632 | ERecord (i, xes) => box [string "({", |
632 space, | 633 space, |
633 string "struct", | 634 string "struct", |
634 space, | 635 space, |