clone method
Create a copy of this declaration, mainly used on class member inheritance and function arguments passing.
Implementation
@override
HTDeclarationNamespace<T> clone() {
final cloned = HTDeclarationNamespace<T>(
lexicon: lexicon,
id: id,
classId: classId,
closure: closure,
source: source);
cloned.symbols.addAll(symbols);
cloned.imports.addAll(imports);
cloned.exports.addAll(exports);
cloned.importedSymbols.addAll(importedSymbols);
return cloned;
}