From: Jean Privat Date: Fri, 9 Jan 2015 03:50:17 +0000 (-0500) Subject: model: add `MModule::mproject` to simplify clients X-Git-Tag: v0.7.1~28^2~4 X-Git-Url: http://nitlanguage.org model: add `MModule::mproject` to simplify clients Signed-off-by: Jean Privat --- diff --git a/src/model/mmodule.nit b/src/model/mmodule.nit index e66f164..2b1e2e5 100644 --- a/src/model/mmodule.nit +++ b/src/model/mmodule.nit @@ -76,6 +76,14 @@ class MModule # The group of module in the project if any var mgroup: nullable MGroup + # The project of the module if any + # Safe alias for `mgroup.mproject` + fun mproject: nullable MProject + do + var g = mgroup + if g == null then return null else return g.mproject + end + # The short name of the module redef var name: String