|
SeExpr
|
Variable scope builder is used by the type checking and code gen to track visiblity of variables and changing of scopes. More...
#include <ExprEnv.h>
Public Member Functions | |
| ExprVarEnvBuilder () | |
| Creates an empty builder with one current scope entry. More... | |
| void | reset () |
| Reset to factory state (one empty environment that is current) More... | |
| ExprVarEnv * | current () |
| Return the current variable scope. More... | |
| void | setCurrent (ExprVarEnv *env) |
| Set a new current variable scope. More... | |
| ExprVarEnv * | createDescendant (ExprVarEnv *parent) |
| Create a descendant scope from the provided parent, does not clobber current. More... | |
Private Attributes | |
| std::vector< std::unique_ptr < ExprVarEnv > > | all |
| All owned symbol tables. More... | |
| ExprVarEnv * | _currentEnv |
| The current symbol table (should be a pointer owned by all) More... | |
Variable scope builder is used by the type checking and code gen to track visiblity of variables and changing of scopes.
|
inline |
|
inline |
Create a descendant scope from the provided parent, does not clobber current.
Definition at line 169 of file ExprEnv.h.
References all.
Referenced by SeExpr2::ExprIfThenElseNode::prep().
|
inline |
Return the current variable scope.
Definition at line 165 of file ExprEnv.h.
References _currentEnv.
Referenced by SeExpr2::ExprPrototypeNode::prep(), SeExpr2::ExprIfThenElseNode::prep(), SeExpr2::ExprAssignNode::prep(), SeExpr2::ExprVarNode::prep(), and SeExpr2::ExprFuncNode::prep().
|
inline |
Reset to factory state (one empty environment that is current)
Definition at line 159 of file ExprEnv.h.
References _currentEnv, and all.
Referenced by ExprVarEnvBuilder(), and SeExpr2::Expression::reset().
|
inline |
Set a new current variable scope.
Definition at line 167 of file ExprEnv.h.
References _currentEnv.
Referenced by SeExpr2::ExprIfThenElseNode::prep().
|
private |
The current symbol table (should be a pointer owned by all)
Definition at line 179 of file ExprEnv.h.
Referenced by current(), reset(), and setCurrent().
|
private |
All owned symbol tables.
Definition at line 177 of file ExprEnv.h.
Referenced by createDescendant(), and reset().
1.8.5