API reference
python:irx:irx.analysis.scopes.ScopeStack
class ScopeStack
ScopeStack()
Source: packages/irx/src/irx/analysis/scopes.py:34
Stack of lexical scopes.
Manage nested lexical scopes for local declarations and name lookup.
Attributes
-
_stack — Stack.; Type: list[Scope]
-
current — Current.; Type: Scope | None
Methods
-
__init__ — Initialize ScopeStack.
-
declare — Declare a symbol in the current scope.
-
pop — Pop the current scope.
-
push — Push a scope.
-
resolve — Resolve a symbol by name.
Properties
- current — Return the current scope.
Attributes
- _stack —