Is elements of n_name correspond to the group nesting of m?

Basically it check that bar::foo matches bar/foo.nit and bar/baz/foo.nit but not baz/foo.nit nor foo/bar.nit

Is used by search_module_by_amodule_name to validate qualified names.

Property definitions

nitc :: loader $ ModelBuilder :: match_amodulename
	# Is elements of `n_name` correspond to the group nesting of `m`?
	#
	# Basically it check that `bar::foo` matches `bar/foo.nit` and `bar/baz/foo.nit`
	# but not `baz/foo.nit` nor `foo/bar.nit`
	#
	# Is used by `search_module_by_amodule_name` to validate qualified names.
	private fun match_amodulename(n_name: AModuleName, m: MModule): Bool
	do
		var g: nullable MGroup = m.mgroup
		for grp in n_name.n_path.reverse_iterator do
			while g != null and grp.text != g.name do
				g = g.parent
			end
		end
		return g != null
	end
src/loader.nit:904,2--919,4