public abstract class UnaryExpression extends ExpressionBase
Constructor and Description |
---|
UnaryExpression(java.lang.String op,
Expression base)
constructs binary expression from op and base
|
Modifier and Type | Method and Description |
---|---|
AST |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
Expression |
getBase()
Returns base expression
|
Expression |
instantiate()
return copy of AST with value references instantiated by the substitutions
set in the corresponding declaration identifiers
|
void |
printCore(java.io.PrintWriter out)
Prints text representation of tree on out (without new line termination).
|
getPriority, printPriority
print, printParens, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
print, printParens, toString
public UnaryExpression(java.lang.String op, Expression base)
op
- the name of the operation used for printingbase
- the operandpublic Expression getBase()
public void printCore(java.io.PrintWriter out)
public Expression instantiate()
public AST accept(ASTVisitor visitor)
visitor
- the visitor who is accepted by this node.