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