nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edb1c8c
)
model_utils: collect mmodules in mproject and mgroups
author
Alexandre Terrasa
<alexandre@moz-code.org>
Wed, 25 Jun 2014 15:24:43 +0000
(11:24 -0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Wed, 25 Jun 2014 19:20:21 +0000
(15:20 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
src/model_utils.nit
patch
|
blob
|
history
diff --git
a/src/model_utils.nit
b/src/model_utils.nit
index
f73ed8b
..
e1d0f52
100644
(file)
--- a/
src/model_utils.nit
+++ b/
src/model_utils.nit
@@
-51,6
+51,16
@@
redef class MGroup
for mgrp in lst do res.add_all mgrp.in_nesting_redef_mclassdefs(min_visibility)
return res
end
+
+ # Collect nested modules
+ fun collect_mmodules: Set[MModule] do
+ var res = new HashSet[MModule]
+ res.add_all mmodules
+ for mgroup in in_nesting.direct_smallers do
+ res.add_all mgroup.collect_mmodules
+ end
+ return res
+ end
end
redef class MModule