import scope
redef class ToolContext
+ # Run `APropdef::do_flow` on each propdef
var flow_phase: Phase = new FlowPhase(self, [scope_phase])
end
private class FlowVisitor
super Visitor
- var current_flow_context: FlowContext
+ var current_flow_context = new FlowContext
var toolcontext: ToolContext
- init(toolcontext: ToolContext)
+ init
do
- self.toolcontext = toolcontext
- current_flow_context = new FlowContext
flows.add(current_flow_context)
current_flow_context.is_start = true
end
- var first: nullable ANode
+ var first: nullable ANode = null
redef fun visit(node)
do
fun printflow
do
- var file = new OFStream.open("flow.dot")
+ var file = new FileWriter.open("flow.dot")
file.write("digraph \{\n")
for f in flows do
var s = ""
end
end
+redef class AWithExpr
+ redef fun accept_flow_visitor(v)
+ do
+ super
+ v.merge_breaks(self.break_mark)
+ end
+end
+
redef class AAssertExpr
redef fun accept_flow_visitor(v)
do