# Require that the scope and the flow analaysis are already performed
module local_var_init
-import scope
import flow
+redef class ToolContext
+ var local_var_init_phase: Phase = new LocalVarInitPhase(self, [flow_phase])
+end
+
+private class LocalVarInitPhase
+ super Phase
+
+ redef fun process_npropdef(npropdef) do npropdef.do_local_var_init(toolcontext)
+end
+
redef class APropdef
# Entry point of the whole local variable initialization verifier
fun do_local_var_init(toolcontext: ToolContext)
redef fun visit(n)
do
- if n != null then n.accept_local_var_visitor(self)
+ n.accept_local_var_visitor(self)
end
end