|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Untamed:
Method Summary | |
Object |
visitAssignExpr(ENode optOriginal,
AtomicExpr noun,
EExpr rValue)
Enabled: varName ":=" rValue. |
Object |
visitCallExpr(ENode optOriginal,
EExpr recip,
String verb,
EExpr[] args)
Enabled: recip verb "(" args*, ")". |
Object |
visitCatchExpr(ENode optOriginal,
EExpr attempt,
Pattern patt,
EExpr catcher)
Enabled: "try" "{" attempt "}" "catch" patt "{" catcher "}". |
Object |
visitCdrPattern(ENode optOriginal,
ListPattern subs,
Pattern rest)
Enabled: listPattern "+" pattern |
Object |
visitDefineExpr(ENode optOriginal,
Pattern patt,
EExpr rValue)
Enabled: "def" patt ":=" rValue. |
Object |
visitEMethod(ENode optOriginal,
String docComment,
String verb,
Pattern[] patterns,
EExpr returnGuard,
EExpr body)
Enabled: "##" docComment "to" verb "(" patterns*, ")" ":" returnGuard "{" body "}". |
Object |
visitEscapeExpr(ENode optOriginal,
Pattern hatch,
EExpr body)
Enabled: "escape" hatch "{" body "}". |
Object |
visitEScript(ENode optOriginal,
EMethodNode[] optMethods,
Matcher optMatcher)
Enabled: "{" methods* matcher? "}"? XXX currently, when a matcher should have been provided to visitObjectExpr, instead an eScript is provided whose optMethods is null. |
Object |
visitFinallyExpr(ENode optOriginal,
EExpr attempt,
EExpr unwinder)
Enabled: "try" "{" attempt "}" "finally" "{" unwinder "}". |
Object |
visitFinalPattern(ENode optOriginal,
String varName,
EExpr valueGuardExpr)
Enabled: varName (":" valueGuardExpr)?. |
Object |
visitHideExpr(ENode optOriginal,
EExpr body)
Enabled: "{" body "}". |
Object |
visitIfExpr(ENode optOriginal,
EExpr test,
EExpr then,
EExpr els)
Enabled: "if" "("test")" "{" then "}" "else" "{" els "}". |
Object |
visitIgnorePattern(ENode optOriginal)
Enabled: "_". |
Object |
visitListPattern(ENode optOriginal,
Pattern[] subs)
Enabled: "["pattern*, "]". |
Object |
visitLiteralExpr(ENode optOriginal,
Object value)
Enabled: value. |
Object |
visitMatchBindExpr(ENode optOriginal,
EExpr specimen,
Pattern patt)
Enabled: specimen "=~" patt. |
Object |
visitMatcher(ENode optOriginal,
Pattern pattern,
EExpr body)
Enabled: "match" pattern "{" body "}". |
Object |
visitNounExpr(ENode optOriginal,
String varName)
Enabled: varName. |
Object |
visitObjectExpr(ENode optOriginal,
String docComment,
String optFQN,
EExpr[] auditors,
EScript eScript)
Enabled: "##" synopsys "def" string-literal ("implements" auditors)? (eScript | matcher) |
Object |
visitQuasiLiteralExpr(ENode optOriginal,
int index)
Enabled: "$" "{" index "}". |
Object |
visitQuasiLiteralPatt(ENode optOriginal,
int index)
Enabled: "$" "{" index "}". |
Object |
visitQuasiPatternExpr(ENode optOriginal,
int index)
Enabled: "@" "{" index "}". |
Object |
visitQuasiPatternPatt(ENode optOriginal,
int index)
Enabled: "@" "{" index "}". |
Object |
visitScopeExpr(ENode optOriginal)
Enabled: "meta" "scope". |
Object |
visitSendExpr(ENode optOriginal,
EExpr recip,
String verb,
EExpr[] args)
Enabled: recip "<-" verb "(" args*, ")". |
Object |
visitSeqExpr(ENode optOriginal,
EExpr[] subs)
Enabled: first "\n" second. |
Object |
visitSlotExpr(ENode optOriginal,
AtomicExpr noun)
Enabled: "&" varName. |
Object |
visitSuchThatPattern(ENode optOriginal,
Pattern patt,
EExpr test)
Enabled: patt "?" test. |
Object |
visitVarPattern(ENode optOriginal,
String varName,
EExpr slotGuardExpr)
Enabled: var varName (":" slotGuardExpr)?. |
Method Detail |
public Object visitAssignExpr(ENode optOriginal, AtomicExpr noun, EExpr rValue)
Does a setValue on the slot named by varName to the value of rValue
public Object visitCallExpr(ENode optOriginal, EExpr recip, String verb, EExpr[] args)
Eval left to right, then synchronously call the verb method of the value of recip with the values of the args.
public Object visitDefineExpr(ENode optOriginal, Pattern patt, EExpr rValue)
Match patt against the value of rValue. Neither patt nor rValue may use any variables defined by the other. This allows their scopes to be order independent.
public Object visitEscapeExpr(ENode optOriginal, Pattern hatch, EExpr body)
Bind hatch to an escape hatch. If the escape hatch's run/1 is called during the execution of body, the escape expression will be exited early, and the run argument will be the value. If run/0 is called, it's as if run(null) were called.
public Object visitHideExpr(ENode optOriginal, EExpr body)
Evaluate body, but hide all variable names it defines from the surrounding scope.
public Object visitIfExpr(ENode optOriginal, EExpr test, EExpr then, EExpr els)
Evaluate test to a boolean. If true, the value is the evaluation of then. Else the value is the evaluation of els.
public Object visitLiteralExpr(ENode optOriginal, Object value)
This value is the value of the expression.
public Object visitMatchBindExpr(ENode optOriginal, EExpr specimen, Pattern patt)
Match patt against the value of specimen. Say whether it matches.
public Object visitNounExpr(ENode optOriginal, String varName)
The result of a getValue() on the slot named by this varName.
public Object visitObjectExpr(ENode optOriginal, String docComment, String optFQN, EExpr[] auditors, EScript eScript)
Define an object that responds to messages according to eScript
Each auditor must be bound to a "global" final variable, ie, a read-only variable in the incoming scope for evaluating the overall expression. The value of this variable is read once and its value is asked to audit the parse tree of the ObjectExpr it is being asked to audit. Only if all auditors approve of all the audited subtrees in the expression as a whole does execution continue.
At runtime, given an auditor and an instance of an ObjectExpr audited by that auditor, it must be possible to unspoofably ask that auditor whether this is such an instance.
XXX currently, when we a matcher should be provided, an eScript with a 'null' for optMethods is provided instead.
public Object visitQuasiLiteralExpr(ENode optOriginal, int index)
A placeholder in a quasi-parseTree to be filled in, by substitution, with a real expression. This is not part of Kernel-E.
public Object visitQuasiPatternExpr(ENode optOriginal, int index)
A placeholder in a quasi-pattern-parseTree to capture a corresponding expression in a specimen parseTree, and say where to put it in the binding vector. This is not part of Kernel-E.
public Object visitScopeExpr(ENode optOriginal)
Reifies the current runtime scope as a runtime scope object. This should not be part of Kernel-E, but currently is.
public Object visitSendExpr(ENode optOriginal, EExpr recip, String verb, EExpr[] args)
Like call, but asks that recip do the operation eventually, in its own turn.
public Object visitSeqExpr(ENode optOriginal, EExpr[] subs)
Do first, then evaluate to the result of second.
public Object visitSlotExpr(ENode optOriginal, AtomicExpr noun)
The value is the slot named by varName.
public Object visitCatchExpr(ENode optOriginal, EExpr attempt, Pattern patt, EExpr catcher)
Evaluate attempt. If it completes successfully, then its value is the value of the catch-expression. If it throws an exception, match it against patt. If it succeeds, evaluate to the evaluation of catcher. Otherwise rethrow the exception.
public Object visitFinallyExpr(ENode optOriginal, EExpr attempt, EExpr unwinder)
Evaluate attempt. On the way out, whether by successful completion or abrupt termination (throw or escape), in all cases evaluate the unwinder before leaving. If attempt succeeds, then the value of the finally-expression is the value of attempt.
public Object visitFinalPattern(ENode optOriginal, String varName, EExpr valueGuardExpr)
Ask the value of valueGuardExpr to coerce(specimen, XXX), and define the the value of varName to be the result.
public Object visitVarPattern(ENode optOriginal, String varName, EExpr slotGuardExpr)
Ask the value of slotGuardExpr to makeSlot(specimen, XXX), and define the result to be the slot named by varName.
public Object visitListPattern(ENode optOriginal, Pattern[] subs)
Is the specimen a list exactly this long, and do each of the elements match the corresponding sub-pattern?
public Object visitCdrPattern(ENode optOriginal, ListPattern subs, Pattern rest)
Is the specimen a list at least as long, and does each of the first N elements match the listPattern's sub-pattern? Does the right hand pattern match a list of the remaining elements?
public Object visitIgnorePattern(ENode optOriginal)
Matches anything, binds nothing.
public Object visitSuchThatPattern(ENode optOriginal, Pattern patt, EExpr test)
Does patt match the specimen? And does test evaluate to true?
public Object visitQuasiLiteralPatt(ENode optOriginal, int index)
A placeholder in a quasi-parseTree to be filled in, by substitution, with a real pattern. Not part of Kernel-E.
public Object visitQuasiPatternPatt(ENode optOriginal, int index)
A placeholder in a quasi-pattern-parseTree to capture a corresponding pattern in a specimen parseTree, and say where to put it in the binding vector. Not part of Kernel-E.
public Object visitEScript(ENode optOriginal, EMethodNode[] optMethods, Matcher optMatcher)
public Object visitEMethod(ENode optOriginal, String docComment, String verb, Pattern[] patterns, EExpr returnGuard, EExpr body)
Defines a method for verb and a number of arguments matching the number of patterns. When the containing object is sent such a message, the arguments are matched against the patterns, and then the body is evaluated. They value of body as coerced by returnGuard is finally revealed.
public Object visitMatcher(ENode optOriginal, Pattern pattern, EExpr body)
When the incoming message doesn't fit any of the methods, then a pair of the verb and the arguments is matched against patt, then body is evaluated, and it value revealed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |