gnu.expr
Class Expression
java.lang.Object
|
+--gnu.expr.Expression
- Direct Known Subclasses:
- ApplyExp, BeginExp, BlockExp, ErrorExp, ExitExp, IfExp, QuoteExp, ReferenceExp, ScopeExp, SetExp, SynchronizedExp, TryExp
- public abstract class Expression
- extends java.lang.Object
- implements Printable
Abstract class for syntactic forms that evaluate to a value.
Scheme S-expressions get re-written to these before evaluation.
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Expression
public Expression()
eval
public java.lang.Object eval(Environment env)
print
public abstract void print(java.io.PrintWriter ps)
- Specified by:
- print in interface Printable
compile
public abstract void compile(Compilation comp,
Target target)
compileWithPosition
public final void compileWithPosition(Compilation comp,
Target target)
- Same as compile, but emit line number beforehard.
compileNotePosition
public final void compileNotePosition(Compilation comp,
Target target)
- Compile, but take note of line number.
compile
public final void compile(Compilation comp,
Type type)
setFile
public final void setFile(java.lang.String filename)
setLine
public final void setLine(int lineno,
int colno)
setLine
public final void setLine(int lineno)
getFile
public final java.lang.String getFile()
getLine
public final int getLine()
- Get the line number of (the start of) this Expression.
The "first" line is line 1.
getColumn
public final int getColumn()
getType
public Type getType()
- Return the Type used to represent the values of this Expression.