public final class Reference extends Identifier implements Type, Expression
Constructor and Description |
---|
Reference(java.lang.String name)
construct reference from name (symbol is set to null)
|
Reference(java.lang.String name,
Symbol symbol)
construct reference from name and symbol
|
Modifier and Type | Method and Description |
---|---|
AST |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
int |
getPriority()
get binding level for printing (lower numbers mean greater binding power)
|
Symbol |
getSymbol()
returns symbol associated to reference
|
Expression |
instantiate()
return copy of AST with value references instantiated by the substitutions
set in the corresponding declaration identifiers
|
Type |
instantiateType()
return copy of AST with value references instantiated by the substitutions
set in the corresponding declaration identifiers
|
void |
print(java.io.PrintWriter out)
Prints text representation on out (without new line termination).
|
void |
printCore(java.io.PrintWriter out)
Prints text representation on out (without new line termination).
|
void |
setSymbol(Symbol symbol)
sets symbol associated to reference
|
getName, printPriority, setName
printParens, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
printPriority
printParens, toString
public Reference(java.lang.String name)
name
- the text representation of the referencepublic Reference(java.lang.String name, Symbol symbol)
name
- the text representation of the referencesymbol
- the symbol associated to the referencepublic Symbol getSymbol()
public void setSymbol(Symbol symbol)
symbol
- the symbolpublic int getPriority()
getPriority
in interface Expression
public Expression instantiate()
instantiate
in interface Expression
public Type instantiateType()
instantiateType
in interface Type
public void printCore(java.io.PrintWriter out)
printCore
in interface AST
printCore
in class Identifier
out
- the stream on which the text is writtenpublic void print(java.io.PrintWriter out)
print
in interface AST
print
in class Identifier
out
- the stream on which the text is writtenpublic AST accept(ASTVisitor visitor)