fun parse_group(mgroup: MGroup): Array[MModule]
do
var res = new Array[MModule]
- visit_group(mgroup)
+ scan_group(mgroup)
for mg in mgroup.in_nesting.smallers do
for mp in mg.module_paths do
var nmodule = self.load_module(mp.filepath)
return mdoc
end
- # Force the identification of all ModulePath of the group and sub-groups.
- fun visit_group(mgroup: MGroup) do
+ # Force the identification of all ModulePath of the group and sub-groups in the file system.
+ #
+ # When a group is scanned, its sub-groups hierarchy is filled (see `MGroup::in_nesting`)
+ # and the potential modules (and nested modules) are identified (see `MGroup::module_paths`).
+ #
+ # Basically, this recursively call `get_mgroup` and `identify_file` on each directory entry.
+ fun scan_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)
+ if g != null then scan_group(g)
identify_file(fp)
end
end
var g = mb.get_mgroup(a)
var mp = mb.identify_file(a)
if g != null and not opt_project.value then
- mb.visit_group(g)
+ mb.scan_group(g)
end
if g == null and mp == null then
# not a group not a module, then look at files in the directory
for f in fs do
g = mb.get_mgroup(a/f)
if g != null and not opt_project.value then
- mb.visit_group(g)
+ mb.scan_group(g)
end
mp = mb.identify_file(a/f)
#print "{a/f}: {mp or else "?"}"
var importations = null
var mgroup = mmodule.mgroup
if toolcontext.opt_depth.value == 1 and mgroup != null then
- modelbuilder.visit_group mgroup
+ modelbuilder.scan_group mgroup
target_modules = mgroup.mmodules
else if toolcontext.opt_depth.value == 2 then
# project