public final class IfThenElseFormula extends IfThenElseExpression implements Formula
Modifier and Type | Field and Description |
---|---|
static int |
precedence |
elseKeyword, elsifKeyword, endifKeyword, ifKeyword, thenKeyword
Modifier and Type | Method and Description |
---|---|
void |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
static IfThenElseFormula |
construct(Formula cond,
Formula tbranch,
Formula ebranch)
Construct a conditional formula.
|
Formula |
getElseBranch()
Get "else" branch.
|
int |
getPrecedence()
Get precedence value of the operator
(higher precedence value means higher binding power)
|
Formula |
getThenBranch()
Get "then" branch.
|
accept, acceptChildren, getCondition
getPosition, isLeftAssociative, isRightAssociative, setPosition
accept, accept, print, printCore, toString, toStringCore
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
isLeftAssociative, isRightAssociative
getPosition, setPosition
accept, acceptChildren, print, printCore, toString, toStringCore
public static final int precedence
public static IfThenElseFormula construct(Formula cond, Formula tbranch, Formula ebranch)
cond
- the condition.tbranch
- the "then" branch.ebranch
- the "else" branch.public Formula getThenBranch()
getThenBranch
in class IfThenElseExpression
public Formula getElseBranch()
getElseBranch
in class IfThenElseExpression
public int getPrecedence()
getPrecedence
in interface Expression
getPrecedence
in class ExpressionBase
public void accept(ASTVisitor visitor)
accept
in interface AST
accept
in class IfThenElseExpression
visitor
- the visitor who is accepted by this node.