nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f1cdf4
)
model_collect: collect all mmodules for a mgroup
author
Alexandre Terrasa
<alexandre@moz-code.org>
Mon, 7 May 2018 21:02:21 +0000
(17:02 -0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Thu, 10 May 2018 14:16:57 +0000
(10:16 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
src/model/model_collect.nit
patch
|
blob
|
history
diff --git
a/src/model/model_collect.nit
b/src/model/model_collect.nit
index
6edd044
..
4df13c6
100644
(file)
--- a/
src/model/model_collect.nit
+++ b/
src/model/model_collect.nit
@@
-380,6
+380,15
@@
redef class MGroup
end
# Collect all modules contained in `self`
+ fun collect_all_mmodules(view: ModelView): HashSet[MModule] do
+ var res = new HashSet[MModule]
+ for mgroup in collect_mgroups(view) do
+ res.add_all mgroup.collect_all_mmodules(view)
+ end
+ return res
+ end
+
+ # Collect all modules contained in `self`
fun collect_mmodules(view: ModelView): HashSet[MModule] do
var res = new HashSet[MModule]
for mmodule in mmodules do