getNamespace method

HTNamespace getNamespace({
  1. String? moduleName,
})

Get a namespace in certain module with a certain name.

Implementation

HTNamespace getNamespace({String? moduleName}) {
  var nsp = globalNamespace;
  if (moduleName != null) {
    final bytecodeModule = cachedModules[moduleName]!;
    assert(bytecodeModule.namespaces.isNotEmpty);
    nsp = bytecodeModule.namespaces.values.last;
  }
  return nsp;
}