SCM Repository
[diderot] Diff of /branches/pure-cfg/src/compiler/c-target/print-as-c.sml
Diff of /branches/pure-cfg/src/compiler/c-target/print-as-c.sml
Parent Directory
|
Revision Log
|
Patch
170 |
str "else"; ppStms blk2) |
str "else"; ppStms blk2) |
171 |
| CL.S_While(e, blk) => ( |
| CL.S_While(e, blk) => ( |
172 |
inHBox (fn () => (str "while"; sp(); ppExp e)); ppStms blk) |
inHBox (fn () => (str "while"; sp(); ppExp e)); ppStms blk) |
173 |
|
| CL.S_For(inits, cond, incrs, blk) => let |
174 |
|
fun ppInit (ty, x, e) = inHBox (fn () => ( |
175 |
|
ppTy(ty, SOME x); |
176 |
|
sp(); str "="; sp(); |
177 |
|
ppExp e)) |
178 |
|
in |
179 |
|
inHBox (fn () => ( |
180 |
|
str "for"; sp(); str "("; |
181 |
|
ppList {pp = ppInit, sep = fn () => str ",", l = inits}; |
182 |
|
str ";"; sp(); |
183 |
|
ppExp cond; str ";"; sp(); |
184 |
|
ppList {pp = ppExp, sep = fn () => str ",", l = incrs})); |
185 |
|
ppStms blk |
186 |
|
end |
187 |
| CL.S_Call(f, args) => ( |
| CL.S_Call(f, args) => ( |
188 |
inHBox (fn () => (str f; ppArgs args; str ";")); |
inHBox (fn () => (str f; ppArgs args; str ";")); |
189 |
PP.newline strm) |
PP.newline strm) |
|
Legend:
Removed from v.616 |
|
changed lines |
|
Added in v.617 |
|
|