This was missing, I don't understand why but I need it.
Pull-Request: #1288
Reviewed-by: Jean Privat <jean@pryen.org>
model.mmodule_importation_hierarchy.sort(mmodules)
var nmodules = new Array[AModule]
for mm in mmodules do
+ if mm.is_fictive then continue
nmodules.add(mmodule2node(mm).as(not null))
end
toolcontext.run_phases(nmodules)
# Registration of the nclassdef associated to each mclassdef
private var mclassdef2nclassdef = new HashMap[MClassDef, AClassdef]
+
+ # Retrieve the associated AST node of a mclassdef.
+ #
+ # This method is used to associate model entity with syntactic entities.
+ # If the class definition is not associated with a node, returns `null`.
+ fun mclassdef2node(mclassdef: MClassDef): nullable AClassdef do
+ return mclassdef2nclassdef.get_or_null(mclassdef)
+ end
end
redef class AModule