contains method

  1. @override
bool contains(
  1. String id, {
  2. bool isPrivate = false,
  3. String? from,
  4. bool recursive = false,
})
override

Implementation

@override
bool contains(String id,
    {bool isPrivate = false, String? from, bool recursive = false}) {
  if (symbols.containsKey(id)) {
    if (isPrivate && from != null && !from.startsWith(fullName)) {
      throw HTError.privateMember(id);
    }
    return true;
  } else if (importedSymbols.containsKey(id)) {
    return true;
  } else if (recursive && (closure != null)) {
    return closure!.contains(id, from: from, recursive: recursive);
  }
  return false;
}