import method
void
import(})
Implementation
void import(HTDeclarationNamespace<dynamic> other,
{bool clone = false,
bool export = false,
Set<String> showList = const {},
bool idOnly = false}) {
bool process(String key, dynamic decl) {
if (!other.willExportAll) {
if (!other.exports.contains(decl?.id)) {
return false;
}
}
if (lexicon.isPrivate(key)) {
return false;
}
if (decl is HTDeclaration) {
if (clone) {
decl = decl.clone();
}
}
if (idOnly) {
defineImport(key, null as T, other.fullName);
} else {
defineImport(key, decl, other.fullName);
}
if (export) {
declareExport(key);
}
return true;
}
for (final key in other.symbols.keys) {
var decl = other.symbols[key]!;
if (!process(key, decl)) continue;
}
for (final key in other.importedSymbols.keys) {
var decl = other.importedSymbols[key]!;
if (other.exports.contains(decl?.id)) {
if (!process(key, decl)) continue;
}
}
}