psyclone.psyir.nodes.scoping_node
This module contains the ScopingNode implementation.
Classes
ScopingNode
: Abstract node that has an associated Symbol Table to keep track of
- class psyclone.psyir.nodes.scoping_node.ScopingNode(children=None, parent=None, symbol_table=None)
Abstract node that has an associated Symbol Table to keep track of symbols declared in its scope (symbols that can be accessed by this node and any of its descendants). If a pre-existing symbol table is provided, it will be attached to the node (raising an error if the symbol table is already attached to another scope), otherwise a new empty Symbol Table will be created.
- Parameters:
children (List[
psyclone.psyir.nodes.Node
]) – the PSyIR nodes that are children of this node.parent (Optional[
psyclone.psyir.nodes.Node
]) – the parent node of this node in the PSyIR.symbol_table (Optional[
psyclone.psyir.symbols.SymbolTable
]) – attach the given symbol table to the new node.
Inheritance
- property symbol_table
- Returns:
table containing symbol information for this scope.
- Return type:
psyclone.psyGen.SymbolTable