Class for doing a tree-walk over an Expression tree.
error
public void error(char kind,
String message)
getColumn
public final int getColumn()
getCompilation
public Compilation getCompilation()
Get the Compilation associated with this walker.
getCurrentLambda
public final LambdaExp getCurrentLambda()
getFile
public final String getFile()
getLine
public final int getLine()
noteError
public Expression noteError(String message)
setColumn
public void setColumn(int column)
setFile
public void setFile(String filename)
setLine
public void setLine(String filename,
int line,
int column)
setLine
public void setLine(int line)
walk
public Expression walk(Expression exp)
Call the walk method of argument Expression.
Could call Expression's walk directly, but this allows us to
interpose a method call on each Expression. We use it to note the
Expression's line number. Should not need to be overridden;
if you do, you may also want to override walkExps.
walkDefaultArgs
public void walkDefaultArgs(LambdaExp exp)
walkExps
public Expression[] walkExps(Expression[] exps,
int n)
Call walk on the Expressions in an array.
However, the walk method is inlined for speed.