orc.ast.simple
Class Definition
java.lang.Object
orc.ast.simple.Definition
public class Definition
- extends java.lang.Object
A unit of syntax that encapsulates an expression definition.
Groups of mutually recursive definitions are scoped in the simplified abstract syntax tree by Defs.
- Author:
- dkitchin
Constructor Summary |
Definition(Var name,
java.util.List<Var> formals,
Expression body,
java.util.List<java.lang.String> typeParams,
java.util.List<Type> argTypes,
Type resultType,
SourceLocation location)
Note that the constructor takes a bound Var as a name parameter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
public Var name
formals
public java.util.List<Var> formals
body
public Expression body
typeParams
protected java.util.List<java.lang.String> typeParams
argTypes
protected java.util.List<Type> argTypes
resultType
protected Type resultType
location
protected SourceLocation location
Definition
public Definition(Var name,
java.util.List<Var> formals,
Expression body,
java.util.List<java.lang.String> typeParams,
java.util.List<Type> argTypes,
Type resultType,
SourceLocation location)
- Note that the constructor takes a bound Var as a name parameter. This is because the
binding of expression names occurs at the level of mutually recursive groups, not at
the level of the individual definitions.
- Parameters:
location
-
subst
public Definition subst(Argument a,
NamedVar x)
suball
public Definition suball(java.util.Map<NamedVar,? extends Argument> m)
vars
public java.util.Set<Var> vars()
convert
public Def convert(Env<Var> vars,
Env<java.lang.String> typevars)
throws CompilationException
- Throws:
CompilationException