orc.ast.simple.arg
Class Argument
java.lang.Object
orc.ast.simple.arg.Argument
- All Implemented Interfaces:
- java.io.Serializable, Locatable, Located
- Direct Known Subclasses:
- Constant, Field, NamedVar, Site, Var
public abstract class Argument
- extends java.lang.Object
- implements java.io.Serializable, Locatable
An AST class (distinct from Expression) which contains arguments to calls.
These arguments may either be variable names or constant values.
Note that in the call M(x,y), M is also technically an argument of the call.
This allows variables to be used in call position.
- Author:
- dkitchin
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Argument
public Argument()
subst
public Argument subst(Argument newArg,
NamedVar oldArg)
addFree
public void addFree(java.util.Set<Var> freeset)
convert
public abstract Arg convert(Env<Var> vars)
throws UnboundVariableException
- Convert to DeBruijn index.
- Throws:
UnboundVariableException
setSourceLocation
public void setSourceLocation(SourceLocation location)
- Specified by:
setSourceLocation
in interface Locatable
getSourceLocation
public SourceLocation getSourceLocation()
- Specified by:
getSourceLocation
in interface Located