fmrisc.AST
Class ValueDeclaration

java.lang.Object
  extended byfmrisc.AST.ASTBase
      extended byfmrisc.AST.DeclarationBase
          extended byfmrisc.AST.ValueDeclaration
All Implemented Interfaces:
AST, Declaration

public final class ValueDeclaration
extends DeclarationBase

Handling of value declarations.


Constructor Summary
ValueDeclaration(ValueDeclIdentifier name, Type type, Expression value)
          construct value declaration with denoted name, type and value.
 
Method Summary
 Identifier getIdentifier()
          returns declaration name
 Type getType()
          returns declaration type
 Expression getValue()
          returns declaration value
 ValueDeclIdentifier getValueDeclIdentifier()
          returns declaration name
 ValueDeclaration instantiate()
          create instantiated copy of declaration
 void printCore(java.io.PrintWriter out)
          Prints text representation of tree on out (without new line termination).
 
Methods inherited from class fmrisc.AST.DeclarationBase
print
 
Methods inherited from class fmrisc.AST.ASTBase
printParens, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface fmrisc.AST.AST
printParens, toString
 

Constructor Detail

ValueDeclaration

public ValueDeclaration(ValueDeclIdentifier name,
                        Type type,
                        Expression value)
construct value declaration with denoted name, type and value.

Parameters:
name - the declared name
type - the type associated to the name
value - the value associated to the name (may be null)
Method Detail

getValueDeclIdentifier

public ValueDeclIdentifier getValueDeclIdentifier()
returns declaration name

Returns:
the name

getIdentifier

public Identifier getIdentifier()
returns declaration name

Returns:
the name

getType

public Type getType()
returns declaration type

Returns:
the type

getValue

public Expression getValue()
returns declaration value

Returns:
the value (may be null)

instantiate

public ValueDeclaration instantiate()
create instantiated copy of declaration

Returns:
the instantiated copy

printCore

public void printCore(java.io.PrintWriter out)
Prints text representation of tree on out (without new line termination).

Specified by:
printCore in interface AST
Specified by:
printCore in class ASTBase
Parameters:
out - the stream on which the text is written