public final class ValueDeclaration extends DeclarationBase
Constructor and Description |
---|
ValueDeclaration(ValueDeclIdentifier name,
Type type,
Expression value)
construct value declaration with denoted name, type and value.
|
Modifier and Type | Method and Description |
---|---|
AST |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
Identifier |
getIdentifier()
returns declaration name
|
Symbol |
getSymbol()
returns symbol
|
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).
|
print
printParens, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
printParens, toString
public ValueDeclaration(ValueDeclIdentifier name, Type type, Expression value)
name
- the declared nametype
- the type associated to the name (may be null)value
- the value associated to the name (may be null)public ValueDeclIdentifier getValueDeclIdentifier()
public Identifier getIdentifier()
public Type getType()
public Expression getValue()
public ValueDeclaration instantiate()
public void printCore(java.io.PrintWriter out)
public Symbol getSymbol()
public AST accept(ASTVisitor visitor)
visitor
- the visitor who is accepted by this node.