loader: add visit_group
authorJean Privat <jean@pryen.org>
Fri, 5 Dec 2014 03:17:04 +0000 (22:17 -0500)
committerJean Privat <jean@pryen.org>
Sat, 6 Dec 2014 04:25:20 +0000 (23:25 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/loader.nit

index b9e8055..54b7610 100644 (file)
@@ -324,6 +324,17 @@ redef class ModelBuilder
                return mgroup
        end
 
+       # Force the identification of all ModulePath of the group and sub-groups.
+       fun visit_group(mgroup: MGroup) do
+               var p = mgroup.filepath
+               for f in p.files do
+                       var fp = p/f
+                       var g = get_mgroup(fp)
+                       if g != null then visit_group(g)
+                       identify_file(fp)
+               end
+       end
+
        # Transform relative paths (starting with '../') into absolute paths
        private fun module_absolute_path(path: String): String do
                return getcwd.join_path(path).simplify_path