public abstract class ExpressionBase extends ASTLogicBase implements Expression
Constructor and Description |
---|
ExpressionBase() |
Modifier and Type | Method and Description |
---|---|
void |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
void |
accept(ASTVisitorOld visitor)
Accept visitor for a visit.
|
SourcePosition |
getPosition()
Get the position of this node in the source code (may be null).
|
int |
getPrecedence()
Get precedence value of the expression operator
(higher precedence value means higher binding power)
|
boolean |
isLeftAssociative()
True if "(e1 op e2) op e3" can be printed as "e1 op e2 op e3"
|
boolean |
isRightAssociative()
True if "e1 op (e2 op e3)" can be printed as "e1 op e2 op e3"
|
void |
setPosition(SourcePosition position)
Set the position of this node in the source code.
|
accept, accept, acceptChildren, print, printCore, toString, toStringCore
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
acceptChildren, print, printCore, toString, toStringCore
public void accept(ASTVisitorOld visitor)
accept
in interface AST
accept
in class ASTLogicBase
visitor
- the visitor who is accepted by this node.public void accept(ASTVisitor visitor)
accept
in interface AST
accept
in class ASTLogicBase
visitor
- the visitor who is accepted by this node.public void setPosition(SourcePosition position)
setPosition
in interface ASTSource
position
- the source code position.public SourcePosition getPosition()
getPosition
in interface ASTSource
public int getPrecedence()
getPrecedence
in interface Expression
public boolean isLeftAssociative()
isLeftAssociative
in interface Expression
public boolean isRightAssociative()
isRightAssociative
in interface Expression