gnu.expr
Class SetExp

java.lang.Object
  |
  +--gnu.expr.Expression
        |
        +--gnu.expr.SetExp

public class SetExp
extends Expression

An Expression to set (bind) or define a new value to a named variable.


Field Summary
 Declaration binding
          If non-null, the local Declaration this refers to.
 
Constructor Summary
SetExp(Declaration decl, Expression val)
           
SetExp(java.lang.String sym, Expression val)
           
 
Method Summary
 void compile(Compilation comp, Target target)
           
 java.lang.Object eval(Environment env)
           
 boolean getHasValue()
          True if evaluating the SetExp yields the value of the RHS.
 Type getType()
          Return the Type used to represent the values of this Expression.
 boolean isDefining()
           
 boolean isFuncDef()
          True if this is a functon definition ("defun").
 boolean isSetIfUnbound()
           
 void print(java.io.PrintWriter ps)
           
 void setDefining(boolean value)
           
 void setFuncDef(boolean value)
           
 void setHasValue(boolean value)
           
 void setSetIfUnbound(boolean value)
           
 
Methods inherited from class gnu.expr.Expression
compile, compileNotePosition, compileWithPosition, getColumn, getFile, getLine, setFile, setLine, setLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

binding

public Declaration binding
If non-null, the local Declaration this refers to.
Constructor Detail

SetExp

public SetExp(java.lang.String sym,
              Expression val)

SetExp

public SetExp(Declaration decl,
              Expression val)
Method Detail

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)
Overrides:
eval in class Expression

compile

public void compile(Compilation comp,
                    Target target)
Overrides:
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

print

public void print(java.io.PrintWriter ps)
Overrides:
print in class Expression