lib/core: add blocking eof implementation
[nit.git] / src / model / model_collect.nit
index 8da799a..4df13c6 100644 (file)
@@ -235,7 +235,7 @@ redef class MPackage
        # 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
+               for mgroup in collect_all_mgroups(view) do
                        res.add_all mgroup.collect_mmodules(view)
                end
                return res
@@ -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