pyre.calc.SymbolTable¶
Module Contents¶
-
class
pyre.calc.SymbolTable.SymbolTable(**kwds)¶ Storage and naming services for algebraic nodes
-
_nodes¶
-
expression(self, value, **kwds)¶ Build an expression node
-
interpolation(self, value, **kwds)¶ Build an interpolation node
-
sequence(self, nodes, **kwds)¶ Build a sequence node
-
mapping(self, nodes, **kwds)¶ Build a mapping node
-
variable(self, **kwds)¶ Build a variable
-
literal(self, **kwds)¶ Build a literal node
-
get(self, name, default=None)¶ Attempt to resolve {name} and return its value; if {name} is not in the symbol table, bind it to {default} and return this new value
-
insert(self, name, node)¶ Insert {node} in the symbol table under {name}. If there is an existing node, adjust the evaluation graph by replacing the existing node with the new one everywhere
-
retrieve(self, name)¶ Retrieve the node registered under {name}. If no such node exists, an error marker will be built, stored in the symbol table under {name}, and returned.
-
__contains__(self, name)¶ Check whether {name} is present in the symbol table
-
__iter__(self)¶ Go through my keys
-
__getitem__(self, name)¶ Look up the node registered under {name} and return its value
-
__setitem__(self, name, value)¶ Add or update the named node with the given {value}
-