8 |
|
|
9 |
structure TreeILPP : sig |
structure TreeILPP : sig |
10 |
|
|
11 |
|
val statement : TextIO.outstream * TreeIL.stm -> unit |
12 |
|
|
13 |
val block : TextIO.outstream * TreeIL.block -> unit |
val block : TextIO.outstream * TreeIL.block -> unit |
14 |
|
|
15 |
val program : TextIO.outstream * TreeIL.program -> unit |
val program : TextIO.outstream * TreeIL.program -> unit |
148 |
pr (out, " else "); |
pr (out, " else "); |
149 |
ppBlock (out, blk2); |
ppBlock (out, blk2); |
150 |
pr (out, "\n")) |
pr (out, "\n")) |
151 |
| IL.S_Exit es => prln (out, [argsToString("exit", es), ";"]) |
| IL.S_Exit es => prln (out, [argsToString("exit", es), ";\n"]) |
152 |
(* return functions for methods *) |
(* return functions for methods *) |
153 |
| IL.S_Active es => prln (out, [argsToString("active", es), ";"]) |
| IL.S_Active es => prln (out, [argsToString("active", es), ";\n"]) |
154 |
| IL.S_Stabilize es => prln (out, [argsToString("stabilize", es), ";"]) |
| IL.S_Stabilize es => prln (out, [argsToString("stabilize", es), ";\n"]) |
155 |
| IL.S_Die => prln (out, ["die;\n"]) |
| IL.S_Die => prln (out, ["die;\n"]) |
156 |
(* end case *)) |
(* end case *)) |
157 |
|
|
158 |
|
fun statement (outS, stm) = ppStm((outS, 0), stm) |
159 |
|
|
160 |
fun block (outS, blk) = (ppBlock ((outS, 0), blk); pr ((outS, 0), "\n")) |
fun block (outS, blk) = (ppBlock ((outS, 0), blk); pr ((outS, 0), "\n")) |
161 |
|
|
162 |
fun program (outS, IL.Program{globals, globalInit, strands}) = let |
fun program (outS, IL.Program{globals, globalInit, strands}) = let |