orc.ast.extended.declaration
Class Declaration

java.lang.Object
  extended by orc.ast.extended.declaration.Declaration
All Implemented Interfaces:
ASTNode, Locatable, Located
Direct Known Subclasses:
ClassDeclaration, DatatypeDeclaration, DefsDeclaration, IncludeDeclaration, SiteDeclaration, TypeAliasDeclaration, TypeDeclaration, ValDeclaration

public abstract class Declaration
extends java.lang.Object
implements ASTNode, Locatable

A unit of syntax that encapsulates some declaration. Declarations affect the environment, for example by adding new bindings, but do not typically do computation on their own. A declaration is scoped in the abstract syntax tree by a Declare object.

Author:
dkitchin

Field Summary
protected  SourceLocation location
           
 
Constructor Summary
Declaration()
           
 
Method Summary
abstract  Expression bindto(Expression target)
           
 SourceLocation getSourceLocation()
           
 void setSourceLocation(SourceLocation location)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface orc.ast.extended.ASTNode
accept
 

Field Detail

location

protected SourceLocation location
Constructor Detail

Declaration

public Declaration()
Method Detail

bindto

public abstract Expression bindto(Expression target)
                           throws CompilationException
Throws:
CompilationException

setSourceLocation

public void setSourceLocation(SourceLocation location)
Specified by:
setSourceLocation in interface Locatable

getSourceLocation

public SourceLocation getSourceLocation()
Specified by:
getSourceLocation in interface ASTNode
Specified by:
getSourceLocation in interface Located