From f217286c517df98cf0c5b0f390a2a60ed66c08af Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Wed, 31 Aug 2016 10:26:29 -0400 Subject: [PATCH] src/model: collect package modules Signed-off-by: Alexandre Terrasa --- src/model/model_collect.nit | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/model/model_collect.nit b/src/model/model_collect.nit index d4e40f4..bfe5fdf 100644 --- a/src/model/model_collect.nit +++ b/src/model/model_collect.nit @@ -154,6 +154,18 @@ redef class MPackage end return res end + + # `MModules` contained in `self`. + fun collect_mmodules(view: ModelView): HashSet[MModule] do + var res = new HashSet[MModule] + for mgroup in mgroups do + for mmodule in mgroup.mmodules do + if not view.accept_mentity(mmodule) then continue + res.add(mmodule) + end + end + return res + end end redef class MGroup -- 1.7.9.5