redef fun process_nmodule(nmodule)
do
# The AST node is not enough, we need also the associated model element
- var mmodule = nmodule.mmodule.as(not null)
+ var mmodule = nmodule.mmodule
+ if mmodule == null then return
# For the specific job we have, the simpler it to launch a visitor on
# all elements of the AST.
var visitor = new DivByZeroVisitor(toolcontext, mmodule)
# The mmodule is the current module
var mmodule: MModule
- init(toolcontext: ToolContext, mmodule: MModule)
- do
- self.toolcontext = toolcontext
- self.mmodule = mmodule
- end
-
redef fun visit(node)
do
# Recursively visit all sub-nodes