public final class PowerTerm extends BinaryExpression
Constructor and Description |
---|
PowerTerm(Expression base1,
Expression base2)
construct power term with components base1 and base2
|
Modifier and Type | Method and Description |
---|---|
AST |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
BinaryExpression |
construct(Expression first,
Expression second)
Construct binary expression of the same kind as this expression.
|
int |
getPriority()
get binding level for printing (lower numbers mean greater binding power)
|
Type |
getType()
get result type
|
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 on out (without new line termination).
|
void |
setType(Type t)
set result type
|
getFirst, getSecond
printPriority
print, printParens, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
print, printParens, toString
public PowerTerm(Expression base1, Expression base2)
base1
- the first componentbase2
- the second componentpublic Type getType()
public void setType(Type t)
t
- the typepublic int getPriority()
getPriority
in interface Expression
getPriority
in class ExpressionBase
public BinaryExpression construct(Expression first, Expression second)
construct
in class BinaryExpression
first
- an expression.second
- an expression.public Expression instantiate()
instantiate
in interface Expression
instantiate
in class BinaryExpression
public AST accept(ASTVisitor visitor)
accept
in interface AST
accept
in class BinaryExpression
visitor
- the visitor who is accepted by this node.public void printCore(java.io.PrintWriter out)
printCore
in interface AST
printCore
in class BinaryExpression
out
- the stream on which the text is written