gnu.expr

Class SetExp

public class SetExp extends AccessExp

An Expression to set (bind) or define a new value to a named variable.
Field Summary
static intDEFINING_FLAG
static intGLOBAL_FLAG
static intHAS_VALUE
static intPREFER_BINDING2
static intPROCEDURE
static intSET_IF_UNBOUND
Constructor Summary
SetExp(Object symbol, Expression val)
SetExp(Declaration decl, Expression val)
Method Summary
voidapply(CallContext ctx)
voidcompile(Compilation comp, Target target)
booleangetHasValue()
True if evaluating the SetExp yields the value of the RHS.
ExpressiongetNewValue()
Get the Expression for calculating the new ("right-hand") value.
TypegetType()
booleanisDefining()
booleanisFuncDef()
True if this is a functon definition ("defun").
booleanisSetIfUnbound()
static SetExpmakeDefinition(Object symbol, Expression val)
static SetExpmakeDefinition(Declaration decl, Expression val)
protected booleanmustCompile()
voidprint(OutPort out)
voidsetDefining(boolean value)
voidsetFuncDef(boolean value)
voidsetHasValue(boolean value)
voidsetSetIfUnbound(boolean value)
StringtoString()
protected Expressionwalk(ExpWalker walker)
protected voidwalkChildren(ExpWalker walker)

Field Detail

DEFINING_FLAG

public static final int DEFINING_FLAG

GLOBAL_FLAG

public static final int GLOBAL_FLAG

HAS_VALUE

public static final int HAS_VALUE

PREFER_BINDING2

public static final int PREFER_BINDING2

PROCEDURE

public static final int PROCEDURE

SET_IF_UNBOUND

public static final int SET_IF_UNBOUND

Constructor Detail

SetExp

public SetExp(Object symbol, Expression val)

SetExp

public SetExp(Declaration decl, Expression val)

Method Detail

apply

public void apply(CallContext ctx)

compile

public void compile(Compilation comp, Target target)

getHasValue

public final boolean getHasValue()
True if evaluating the SetExp yields the value of the RHS.

getNewValue

public final Expression getNewValue()
Get the Expression for calculating the new ("right-hand") value.

getType

public final Type getType()

isDefining

public final boolean isDefining()

isFuncDef

public final boolean isFuncDef()
True if this is a functon definition ("defun").

isSetIfUnbound

public final boolean isSetIfUnbound()

makeDefinition

public static SetExp makeDefinition(Object symbol, Expression val)

makeDefinition

public static SetExp makeDefinition(Declaration decl, Expression val)

mustCompile

protected boolean mustCompile()

print

public void print(OutPort out)

setDefining

public final void setDefining(boolean value)

setFuncDef

public final void setFuncDef(boolean value)

setHasValue

public final void setHasValue(boolean value)

setSetIfUnbound

public final void setSetIfUnbound(boolean value)

toString

public String toString()

walk

protected Expression walk(ExpWalker walker)

walkChildren

protected void walkChildren(ExpWalker walker)