From: Alexis Laferrière Date: Sun, 15 Jun 2014 13:28:40 +0000 (-0400) Subject: pep8analysis: print CFG as dot graph to OStream X-Git-Tag: v0.6.6~24^2~9 X-Git-Url: http://nitlanguage.org pep8analysis: print CFG as dot graph to OStream Signed-off-by: Alexis Laferrière --- diff --git a/contrib/pep8analysis/src/cfg/dot_printer.nit b/contrib/pep8analysis/src/cfg/dot_printer.nit index b4fe76e..9c2fe38 100644 --- a/contrib/pep8analysis/src/cfg/dot_printer.nit +++ b/contrib/pep8analysis/src/cfg/dot_printer.nit @@ -1,7 +1,7 @@ import cfg_base redef class CFG - fun print_dot( f: OFStream, long: Bool ) + fun print_dot( f: OStream, long: Bool ) do f.write("digraph \{\n") f.write("charset=latin1\n") @@ -13,7 +13,7 @@ redef class CFG end redef class BasicBlock - fun print_dot_nodes( f: OFStream, long: Bool ) + fun print_dot_nodes( f: OStream, long: Bool ) do var lbl if long then @@ -38,7 +38,7 @@ redef class BasicBlock fun dot_node_header: String do return "" fun dot_node_footer: String do return "" - fun print_dot_edges( f: OFStream, long: Bool ) + fun print_dot_edges( f: OStream, long: Bool ) do for s in successors do f.write( "{name} -> {s.name}\n" )