API reference
python:irx:irx.analysis.bindings.VisibleBindings
class VisibleBindings
VisibleBindings(*, context: SemanticContext, factory: SemanticEntityFactory, bindings: dict[ModuleKey, dict[str, SemanticBinding]] | None = None)
Source: packages/irx/src/irx/analysis/bindings.py:27
Module-visible binding manager.
Track top-level and imported names that are visible within each module namespace and enforce conflicts independently from lexical scopes.
Attributes
-
context — Type: SemanticContext
-
factory — Type: SemanticEntityFactory
-
_bindings — Type: dict[ModuleKey, dict[str, SemanticBinding]]
Methods
-
__init__ — Initialize VisibleBindings.
-
_current_module_key — Return the active or explicit module key.
-
bind — Bind one visible name in a module namespace.
-
bind_class — Bind a class in a module namespace.
-
bind_function — Bind a function in a module namespace.
-
bind_module — Bind an imported module in a module namespace.
-
bind_struct — Bind a struct in a module namespace.
-
binding_conflicts — Return True when two bindings disagree.
-
bindings_for — Return one module's visible binding table.
-
resolve — Resolve one visible binding by name.
Properties
- tables — Return the backing binding tables.