gnu.expr
Class ThisExp
java.lang.Object
gnu.mapping.PropertySet
gnu.mapping.Procedure
gnu.mapping.Procedure0
gnu.expr.Expression
gnu.expr.AccessExp
gnu.expr.ReferenceExp
gnu.expr.ThisExp
- All Implemented Interfaces:
- Named, Printable, javax.xml.transform.SourceLocator, org.xml.sax.Locator
public class ThisExp
- extends ReferenceExp
Evaluates to the "this" implicit variable.
This is currently neither robust nor general. FIXME!
Field Summary |
static java.lang.String |
THIS_NAME
Non-interned name for implicit 'this' variable. |
Methods inherited from class gnu.expr.Expression |
apply0, compile, compile, compileButFirst, compileNotePosition, compileWithPosition, compileWithPosition, eval, eval, getColumnNumber, getFileName, getFlag, getFlags, getLineNumber, getPublicId, getSystemId, isStableSourceLocation, makeWhile, match0, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, setLocation, valueIfConstant, walkChildren |
Methods inherited from class gnu.mapping.Procedure |
apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getSetter, getSourceLocation, match1, match2, match3, match4, matchN, maxArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
THIS_NAME
public static final java.lang.String THIS_NAME
- Non-interned name for implicit 'this' variable.
ThisExp
public ThisExp()
ThisExp
public ThisExp(ScopeExp context)
ThisExp
public ThisExp(Declaration binding)
ThisExp
public ThisExp(ClassType type)
isForContext
public final boolean isForContext()
- If this is being used to pass the context instance to a Macro.
apply
public void apply(CallContext ctx)
throws java.lang.Throwable
- Description copied from class:
Expression
- Evaluate the expression.
This is named apply rather than eval so it is compatible with the
full-tail-call calling convention, and we can stash an Expression in
CallContext's proc field. FIXME - are we making use of this?
- Overrides:
apply
in class ReferenceExp
- Throws:
java.lang.Throwable
getContextScope
public ScopeExp getContextScope()
makeGivingContext
public static ThisExp makeGivingContext(ScopeExp context)
compile
public void compile(Compilation comp,
Target target)
- Overrides:
compile
in class ReferenceExp
walk
protected Expression walk(ExpWalker walker)
- Overrides:
walk
in class ReferenceExp
getType
public final Type getType()
- Description copied from class:
Expression
- Return the Type used to represent the values of this Expression.
- Overrides:
getType
in class ReferenceExp