This method creates a new concrete class definition MClassDef
, and adds it to the class hierarchy.
See create_class_from_mclassdef
for more information.
# Creation of a new class (AST and model representation) with the given MClass.
# This method creates a new concrete class definition `MClassDef`, and adds it to the class hierarchy.
# See `create_class_from_mclassdef` for more information.
fun create_class_from_mclass(mclass: MClass, super_type: Array[MClassType], mmodule: MModule): AStdClassdef do
var mclassdef = new MClassDef(mmodule, mclass.mclass_type, mmodule.location)
mclassdef.set_supertypes(super_type)
mclassdef.add_in_hierarchy
return create_class_from_mclassdef(mclassdef, mmodule)
end
src/astbuilder.nit:1135,2--1144,4