Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/c-util/print-as-c.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/c-util/print-as-c.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2833, Wed Nov 19 15:01:38 2014 UTC revision 2834, Wed Nov 19 15:20:13 2014 UTC
# Line 212  Line 212 
212                    | CL.S_Exp e => inHBox (fn () => (ppExp e; str ";"))                    | CL.S_Exp e => inHBox (fn () => (ppExp e; str ";"))
213                    | CL.S_If(e, blk, CL.S_Block[]) =>                    | CL.S_If(e, blk, CL.S_Block[]) =>
214                        inHBox (fn () => (str "if"; sp(); ppExp e; ppStmAsBlock blk))                        inHBox (fn () => (str "if"; sp(); ppExp e; ppStmAsBlock blk))
215                      | CL.S_If(e, blk1, stm as CL.S_If _) => (
216                          PP.openVBox strm indent0;
217                            inHBox (fn () => (str "if"; sp(); ppExp e; ppStmAsBlock blk1));
218                            PP.newline strm;
219                          PP.closeBox strm;
220                          inHBox (fn () => (str "else"; sp(); ppStm stm)))
221                    | CL.S_If(e, blk1, blk2) => (                    | CL.S_If(e, blk1, blk2) => (
222                        PP.openVBox strm indent0;                        PP.openVBox strm indent0;
223                          inHBox (fn () => (str "if"; sp(); ppExp e; ppStmAsBlock blk1));                          inHBox (fn () => (str "if"; sp(); ppExp e; ppStmAsBlock blk1));
# Line 244  Line 250 
250                    | CL.S_Continue => str "continue;"                    | CL.S_Continue => str "continue;"
251                  (* end case *))                  (* end case *))
252          (* force printing "{" "}" around a statement *)          (* force printing "{" "}" around a statement *)
253            and ppStmAsBlock (CL.S_Block stms) = ppBlock stms            and ppStmAsBlock (CL.S_Block stms) = (sp(); ppBlock stms)
254              | ppStmAsBlock stm = ppBlock [stm]              | ppStmAsBlock stm = (sp(); ppBlock [stm])
255  (*  (*
256            and ppStms (CL.S_Block stms) = (sp(); ppBlock stms)            and ppStms (CL.S_Block stms) = (sp(); ppBlock stms)
257              | ppStms stm = (              | ppStms stm = (

Legend:
Removed from v.2833  
changed lines
  Added in v.2834

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0