gnu.expr
Class ReferenceExp
java.lang.Object
|
+--gnu.expr.Expression
|
+--gnu.expr.ReferenceExp
- Direct Known Subclasses:
- ThisExp
- public class ReferenceExp
- extends Expression
This class represents a variable reference (an identifier).
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ReferenceExp
public ReferenceExp(java.lang.String symbol)
ReferenceExp
public ReferenceExp(java.lang.String symbol,
Declaration binding)
ReferenceExp
public ReferenceExp(Declaration binding)
string_name
public java.lang.String string_name()
getName
public final java.lang.String getName()
getBinding
public final Declaration getBinding()
- If non-null, the local Declaration this refers to.
getDontDereference
public final boolean getDontDereference()
setDontDereference
public final void setDontDereference(boolean setting)
isProcedureName
public final boolean isProcedureName()
- True if this identifier appears in "function call position".
If so, it should be interpreted as a function name, which makes a
difference for languages (like Common Lisp) that have two name spaces.
setProcedureName
public final void setProcedureName(boolean setting)
- Note if this identifier appears in "function call position".
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
print
public void print(java.io.PrintWriter ps)
- Overrides:
- print 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
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object