orc.ast.extended.expression
Class Lambda
java.lang.Object
orc.ast.extended.expression.Expression
orc.ast.extended.expression.Lambda
- All Implemented Interfaces:
- ASTNode, Locatable, Located
public class Lambda
- extends Expression
Constructor Summary |
Lambda(java.util.List<java.util.List<Pattern>> formals,
Expression body,
Type resultType,
java.util.List<java.lang.String> typeFormals)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
formals
public java.util.List<java.util.List<Pattern>> formals
body
public Expression body
resultType
public Type resultType
typeFormals
public java.util.List<java.lang.String> typeFormals
Lambda
public Lambda(java.util.List<java.util.List<Pattern>> formals,
Expression body,
Type resultType,
java.util.List<java.lang.String> typeFormals)
makeThunk
public static Lambda makeThunk(Expression body)
simplify
public Expression simplify()
throws CompilationException
- Description copied from class:
Expression
- Simplify an expression which occurs in a call (non-nested) position.
- Specified by:
simplify
in class Expression
- Returns:
- The simplified expression
- Throws:
CompilationException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
accept
public <E> E accept(Visitor<E> visitor)