Package org.eclipse.epsilon.eol.dom
Class TernaryExpression
-
- All Implemented Interfaces:
ModuleElement
,IExecutableModuleElement
public class TernaryExpression extends OperatorExpression
Ternary operator, similar to Java's.- Since:
- 1.6
- Author:
- Sina Madani
-
-
Field Summary
Fields Modifier and Type Field Description protected Expression
thirdOperand
-
Fields inherited from class org.eclipse.epsilon.eol.dom.OperatorExpression
firstOperand, operator, secondOperand
-
-
Constructor Summary
Constructors Constructor Description TernaryExpression()
TernaryExpression(Expression condition, Expression rIfTrue, Expression rIfFalse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(IEolVisitor visitor)
void
build(AST cst, IModule module)
Object
execute(IEolContext context)
Expression
getThirdOperand()
void
setThirdOperand(Expression thirdOperand)
-
Methods inherited from class org.eclipse.epsilon.eol.dom.OperatorExpression
getFirstOperand, getOperands, getOperator, getSecondOperand, setFirstOperand, setOperator, setSecondOperand
-
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getChildren, getComments, getData, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, hashCode, setModule, setParent, setRegion, setUri, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.epsilon.common.module.ModuleElement
getChildren, getComments, getData, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
-
-
-
Field Detail
-
thirdOperand
protected Expression thirdOperand
-
-
Constructor Detail
-
TernaryExpression
public TernaryExpression()
-
TernaryExpression
public TernaryExpression(Expression condition, Expression rIfTrue, Expression rIfFalse)
-
-
Method Detail
-
build
public void build(AST cst, IModule module)
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classOperatorExpression
-
execute
public Object execute(IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
getThirdOperand
public Expression getThirdOperand()
-
setThirdOperand
public void setThirdOperand(Expression thirdOperand)
-
accept
public void accept(IEolVisitor visitor)
- Specified by:
accept
in classExpression
-
-