| 
 |   | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
  |
  +--org.erights.e.elang.evm.ParseNode
        |
        +--org.erights.e.elang.evm.ENode
              |
              +--org.erights.e.elang.evm.EExpr
                    |
                    +--org.erights.e.elang.evm.FinallyExpr
Safe: BNF: "try" block "finally" block
Evaluates the try-clause, but exiting to the enclosing context also evaluate the finally-clause. If the finally-clause exits normally (evaluates to a value), then the exit of the FinallyExpr as a whole is the exit of the try-clause. In other words, if the try-clause evaluates to a value, then the FinallyExpr evaluates to that same value. If the try-clause throws or escapes, then the FinallyExpr as a whole likewise throws or escapes.
On the other hand, if the finally-clause does a non-local exit (throws or escapes) then the FinallyExpr as a whole exits in that way. A non-local finally-clause exit replaces the try-clause exit as the means of exiting.
| Field Summary | |
| private  EExpr | myAttempt | 
| private  EExpr | myUnwinder | 
| Fields inherited from class org.erights.e.elang.evm.ENode | 
|  | 
| Fields inherited from class org.erights.e.elang.evm.ParseNode | 
| NUM_PR, PR_ASSIGN, PR_CALL, PR_COMP, PR_EEXPR, PR_LISTPATT, PR_ORDER, PR_PATTERN, PR_PRIM, PR_START | 
| Constructor Summary | |
| FinallyExpr(SourceSpan optSpan,
            EExpr attempt,
            EExpr unwinder)Enabled: | |
| Method Summary | |
|  EExpr | attempt()Enabled: | 
| protected  StaticScope | computeStaticScope()When staticScope() is first requested on a given node, it calls computeStaticScope() to do the actual computation, which is then remembered. | 
|  boolean | matchBind(ConstList args,
          Object specimen,
          FlexList bindings)Enabled: | 
| protected  Object | subEval(EvalContext ctx,
        boolean forValue)The recursive part that does the work | 
|  void | subPrintOn(TextWriter out,
           int priority)Enabled: | 
|  EExpr | unwinder()Enabled: | 
|  Object | welcome(ETreeVisitor visitor)Enabled: | 
| Methods inherited from class org.erights.e.elang.evm.EExpr | 
| __printOn, appendAllTo, appendTo, eval, eval, evalBool, printAsBlockOn, substitute, transform | 
| Methods inherited from class org.erights.e.elang.evm.ENode | 
| cleanCopy, copy, getOptPatternMap, getOptScopeMap, getPatternMap, getScopeMap, qbuild, setPatternMap, setScopeMap, staticScope, synEnv | 
| Methods inherited from class org.erights.e.elang.evm.ParseNode | 
| asText, getOptSpan, lnPrintOn, lnPrintOn, matchBind, matchBind, matchBind, printListOn, toString | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
private final EExpr myAttempt
private final EExpr myUnwinder
| Constructor Detail | 
public FinallyExpr(SourceSpan optSpan,
                   EExpr attempt,
                   EExpr unwinder)
| Method Detail | 
public Object welcome(ETreeVisitor visitor)
welcome in class ENodeprotected StaticScope computeStaticScope()
ENode
computeStaticScope in class ENode
protected Object subEval(EvalContext ctx,
                         boolean forValue)
EExpr
subEval in class EExpr
public boolean matchBind(ConstList args,
                         Object specimen,
                         FlexList bindings)
matchBind in interface MatchMakermatchBind in class ParseNodepublic EExpr attempt()
public EExpr unwinder()
public void subPrintOn(TextWriter out,
                       int priority)
                throws IOException
subPrintOn in class ParseNodeIOException| 
 |   | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
