|
|
||||||||||
| 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.Pattern
|
+--org.erights.e.elang.evm.SuchThatPattern
Safe: BNF: pattern "?" expr
Matches if the sub pattern matches and the expression evaluates to true.
| Field Summary | |
private Pattern |
mySubPattern
|
private EExpr |
myTest
|
| 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 | |
SuchThatPattern(SourceSpan optSpan,
Pattern sub,
EExpr test)
Enabled: |
|
| Method Summary | |
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: |
String |
optName()
Enabled: |
void |
subPrintOn(TextWriter out,
int priority)
Enabled: |
(package private) void |
testMatch(EvalContext ctx,
Object specimen,
OneArgFunc optEjector)
If this pattern matches the specimen, add macthing bindings to the scope. |
Object |
welcome(ETreeVisitor visitor)
Enabled: |
| Methods inherited from class org.erights.e.elang.evm.Pattern |
__printOn, substitute |
| 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 Pattern mySubPattern
private final EExpr myTest
| Constructor Detail |
public SuchThatPattern(SourceSpan optSpan,
Pattern sub,
EExpr test)
| Method Detail |
public Object welcome(ETreeVisitor visitor)
welcome in class ENodeprotected StaticScope computeStaticScope()
ENode
computeStaticScope in class ENode
public boolean matchBind(ConstList args,
Object specimen,
FlexList bindings)
matchBind in interface MatchMakermatchBind in class ParseNode
public void subPrintOn(TextWriter out,
int priority)
throws IOException
subPrintOn in class ParseNodeIOException
void testMatch(EvalContext ctx,
Object specimen,
OneArgFunc optEjector)
PatternOtherwise report the reason why not according to optEjector.
testMatch in class Patternpublic String optName()
optName in class Pattern
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||