bridgedLibraryUris property

Set<String> get bridgedLibraryUris

The set of library URIs that have at least one registered bridge (class, enum, extension, function, variable, getter, or setter).

This is the public-barrel set the host-side AstBundler needs in order to skip bridged imports when compiling a script's source into an AstBundle (those libraries are handled natively at runtime, not bundled). The runner already records the library URI as the map key on every registration, so this getter simply aggregates those keys — no extra bookkeeping is required. Lives here (zero-dependency core) so the host parser can be any analyzer front-end without coupling the runtime to it.

Implementation

Set<String> get bridgedLibraryUris {
  final uris = <String>{};
  void addKeys<V>(List<Map<String, V>> registries) {
    for (final entry in registries) {
      uris.addAll(entry.keys);
    }
  }

  addKeys(_bridgedClasses);
  addKeys(_bridgedEnumDefinitions);
  addKeys(_bridgedExtensions);
  addKeys(_libraryFunctions);
  addKeys(_libraryVariables);
  addKeys(_libraryGetters);
  addKeys(_librarySetters);
  return uris;
}