API reference
python:astx:astx.symbol_table.Scope.add
method add
add(name: str, parent: Optional[ScopeNodeBase] = None, change_current: bool = True) -> ScopeNodeBase
Source: packages/astx/src/astx/symbol_table.py:105
Add a new node in the scope.
Parameters
-
name โ Name identifying the declaration or operation.; Type: str
-
parent โ Parent node or enclosing scope.; Type: Optional[ScopeNodeBase]
-
change_current โ Whether to use change current.; Type: bool
Returns
Result of this operation: add a new node in the scope.; Type: ScopeNodeBase