Compares identifiers for sorting.
Test for selective imports.
auto visitor = visitImports(q{ import foo : aa, bb, cc; }); assert(visitor.importGroups[0][0].fullName == "foo"); assert(equal(visitor.importGroups[0][0].bindNames, ["aa", "bb", "cc"]));
Test for renamed imports.
auto visitor = visitImports(q{ import foo = bar; import bar = foo; import baz.foo; import zz : f = foo; }); // Sorting is based on the renamed name if exists. sort(visitor.importGroups[0]); assert(visitor.importGroups[0][0].fullName == "bar = foo"); assert(visitor.importGroups[0][1].fullName == "baz.foo"); assert(visitor.importGroups[0][2].fullName == "foo = bar"); assert(visitor.importGroups[0][3].fullName == "zz");
Data type for identifiers in an import declaration. import mod : binds, ...;