nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd7adcb
)
model: add `MModule::mproject` to simplify clients
author
Jean Privat
<jean@pryen.org>
Fri, 9 Jan 2015 03:50:17 +0000
(22:50 -0500)
committer
Jean Privat
<jean@pryen.org>
Sat, 10 Jan 2015 02:23:19 +0000
(21:23 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>
src/model/mmodule.nit
patch
|
blob
|
history
diff --git
a/src/model/mmodule.nit
b/src/model/mmodule.nit
index
e66f164
..
2b1e2e5
100644
(file)
--- 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