defineImport method

void defineImport(
  1. String key,
  2. T decl
)

Implementation

void defineImport(String key, T decl) {
  if (!importedSymbols.containsKey(key)) {
    importedSymbols[key] = decl;
  } else {
    throw HTError.defined(key, ErrorType.runtimeError);
  }
}