X-Git-Url: http://nitlanguage.org diff --git a/src/model/mmodule.nit b/src/model/mmodule.nit index 4cdd340..a410236 100644 --- a/src/model/mmodule.nit +++ b/src/model/mmodule.nit @@ -248,18 +248,19 @@ class MModule end end - # Is `self` a unit test module used by `nitunit`? - var is_test_suite: Bool = false is writable + # Is `self` a module generated by a tool? + # + # This flag has no effect on the semantic. + # It is only intended on software engineering software to discriminate computer-generated modules from human-written ones. + var is_generated: Bool = false is writable - # Get the first non `is_fictive` module greater than self - fun first_real_mmodule: MModule - do - var mmodule = self - while mmodule.is_fictive do - mmodule = mmodule.in_importation.direct_greaters.first - end - return mmodule - end + # Get the non-`is_fictive` module on which `self` is based on. + # + # On non-fictive module, this returns `self`. + # On fictive modules, this is used to refer the module which `self` is based on. + # + # This attribute should be set when a fictive module is created. See `is_fictive`. + var first_real_mmodule: MModule = self is writable redef fun parent_concern do return mgroup end