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:26
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 — Context for the operation.; Type: SemanticContext
-
factory — Factory.; Type: SemanticEntityFactory
-
_bindings — Bindings.; Type: dict[ModuleKey, dict[str, SemanticBinding]]
-
tables — Tables.; Type: dict[ModuleKey, dict[str, SemanticBinding]]
Methods
-
__init__ — Initialize VisibleBindings.
-
_current_module_key — Return the active or explicit module key.
-
allows_function_access — Enforce module-local function visibility without changing linkage.
-
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.