net.sf.farrago.fennel.calc
Class RexToCalcTranslator.ExpressionScope
java.lang.Object
net.sf.farrago.fennel.calc.RexToCalcTranslator.ExpressionScope
- Enclosing class:
- RexToCalcTranslator
public class RexToCalcTranslator.ExpressionScope
- extends Object
Supports scoping rules for calculator programs. Conditional code, not
visible outside a block of code, belongs in its own scope.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parent
private final RexToCalcTranslator.ExpressionScope parent
results
private final Map<String,CalcReg> results
RexToCalcTranslator.ExpressionScope
private RexToCalcTranslator.ExpressionScope(RexToCalcTranslator.ExpressionScope parent)
RexToCalcTranslator.ExpressionScope
public RexToCalcTranslator.ExpressionScope()
- Constructs a new scope
newScope
public RexToCalcTranslator.ExpressionScope newScope()
- Returns a new scope extending the current scope. Must always be
matched with popScope or mysterious errors will arise.
popScope
public RexToCalcTranslator.ExpressionScope popScope()
- Returns the parent scope
get
public CalcReg get(String key)
set
public void set(String key,
CalcReg result)
clear
public void clear()