gnu.expr
Class SetExp
java.lang.Object
gnu.mapping.Procedure
gnu.mapping.Procedure0
gnu.expr.Expression
gnu.expr.AccessExp
gnu.expr.SetExp
- All Implemented Interfaces:
- Named, Printable
public class SetExp
- extends AccessExp
An Expression to set (bind) or define a new value to a named variable.
Methods inherited from class gnu.expr.Expression |
apply, apply0, compile, compileButFirst, compileNotePosition, compileWithPosition, compileWithPosition, eval, getColumn, getFile, getFlag, getFlags, getLine, makeWhile, match0, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine |
Methods inherited from class gnu.mapping.Procedure |
apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getProperty, getSetter, match1, match2, match3, match4, matchN, maxArgs, minArgs, name, removeProperty, set0, set1, setN, setName, setProperty, setProperty, setSetter, setSymbol |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFINING_FLAG
public static final int DEFINING_FLAG
- See Also:
- Constant Field Values
GLOBAL_FLAG
public static final int GLOBAL_FLAG
- See Also:
- Constant Field Values
PREFER_BINDING2
public static final int PREFER_BINDING2
- See Also:
- Constant Field Values
PROCEDURE
public static final int PROCEDURE
- See Also:
- Constant Field Values
SET_IF_UNBOUND
public static final int SET_IF_UNBOUND
- See Also:
- Constant Field Values
HAS_VALUE
public static final int HAS_VALUE
- See Also:
- Constant Field Values
SetExp
public SetExp(java.lang.Object symbol,
Expression val)
SetExp
public SetExp(Declaration decl,
Expression val)
getNewValue
public final Expression getNewValue()
- Get the Expression for calculating the new ("right-hand") value.
isDefining
public final boolean isDefining()
setDefining
public final void setDefining(boolean value)
getHasValue
public final boolean getHasValue()
- True if evaluating the SetExp yields the value of the RHS.
setHasValue
public final void setHasValue(boolean value)
isFuncDef
public final boolean isFuncDef()
- True if this is a functon definition ("defun").
setFuncDef
public final void setFuncDef(boolean value)
isSetIfUnbound
public final boolean isSetIfUnbound()
setSetIfUnbound
public final void setSetIfUnbound(boolean value)
eval
public java.lang.Object eval(Environment env)
throws java.lang.Throwable
- Overrides:
eval
in class Expression
- Throws:
java.lang.Throwable
compile
public void compile(Compilation comp,
Target target)
- Specified by:
compile
in class Expression
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 Expression
walk
protected Expression walk(ExpWalker walker)
- Overrides:
walk
in class Expression
walkChildren
protected void walkChildren(ExpWalker walker)
- Overrides:
walkChildren
in class Expression
print
public void print(OutPort out)
- Specified by:
print
in class Expression
toString
public java.lang.String toString()
- Overrides:
toString
in class Procedure