nitc :: ModelBuilder :: parse_full
Each name can be:
paths
(-I)Then, for each entry, if it is:
See parse
for details.
# Load a bunch of modules and groups.
#
# Each name can be:
#
# * a path to a module, a group or a directory of packages.
# * a short name of a module or a group that are looked in the `paths` (-I)
#
# Then, for each entry, if it is:
#
# * a module, then is it parsed and returned.
# * a group then recursively all its modules are parsed.
# * a directory of packages then all the modules of all packages are parsed.
# * else an error is displayed.
#
# See `parse` for details.
fun parse_full(names: Sequence[String]): Array[MModule]
do
var time0 = get_time
# Parse and recursively load
self.toolcontext.info("*** PARSE ***", 1)
var mmodules = new ArraySet[MModule]
var scans = scan_full(names)
for mmodule in scans do
var ast = mmodule.load(self)
if ast == null then continue # Skip error
mmodules.add mmodule
end
var time1 = get_time
self.toolcontext.info("*** END PARSE: {time1-time0} ***", 2)
self.toolcontext.check_errors
if toolcontext.opt_only_parse.value then
self.toolcontext.info("*** ONLY PARSE...", 1)
self.toolcontext.quit
end
return mmodules.to_a
end
src/loader.nit:180,2--218,4