public abstract class Identifier extends ASTBase
Constructor and Description |
---|
Identifier(java.lang.String name)
construct identifier from name
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
returns name of identifier
|
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 |
printPriority(int treshold,
java.io.PrintWriter out)
print expression, use parentheses if priority is greater than treshold
|
void |
setName(java.lang.String name)
set name of identifier
|
printParens, toString
public Identifier(java.lang.String name)
name
- the text representation of the identifierpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the identifier namepublic void printCore(java.io.PrintWriter out)
public void print(java.io.PrintWriter out)
public void printPriority(int treshold, java.io.PrintWriter out)
treshold
- priority level of enclosing expressionout
- writer to print expression on