orc.ast.extended.declaration.type
Class DatatypeDeclaration
java.lang.Object
orc.ast.extended.declaration.Declaration
orc.ast.extended.declaration.type.DatatypeDeclaration
- All Implemented Interfaces:
- ASTNode, Locatable, Located
public class DatatypeDeclaration
- extends Declaration
Declaration of a variant type.
Even if the typechecker is not active, this declaration will still create
constructor sites which can be used for pattern matching.
- Author:
- dkitchin
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
typename
public java.lang.String typename
members
public java.util.List<Constructor> members
formals
public java.util.List<java.lang.String> formals
DatatypeDeclaration
public DatatypeDeclaration(java.lang.String typename,
java.util.List<Constructor> members,
java.util.List<java.lang.String> formals)
bindto
public Expression bindto(Expression target)
- Specified by:
bindto
in class Declaration
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
accept
public <E> E accept(Visitor<E> visitor)