public final class ConditionalExpression extends Expression
Constructor and Description |
---|
ConditionalExpression(ASTInfo info,
Expression ifExpression,
Expression thenExpression,
Expression elseExpression,
Type returnType)
Constructs a new conditional expression.
|
ConditionalExpression(ASTInfo info,
List<Expression> ifExpressions,
List<Expression> thenExpressions,
Expression elseExpression,
Type returnType)
Constructs a new conditional expression.
|
Modifier and Type | Method and Description |
---|---|
<T,E extends Throwable> |
accept(ExpressionVisitor<T,E> visitor)
Accepts visitor.
|
protected Object |
basicInterpret(Interpreter interpreter,
InterpreterStackTrace stackTrace)
Interpret expression.
|
Expression |
getElseExpression()
Returns the "else" expression.
|
ASTNode |
getElseKeywordRange() |
ASTNode |
getEndKeywordRange() |
List<Expression> |
getIfExpressions()
Returns the list of "if" expressions.
|
ASTNode |
getIfKeywordRange(int index) |
List<Expression> |
getResultExpressions()
Returns the result expression.
|
List<Expression> |
getThenExpressions()
Returns the list of "then" expressions.
|
ASTNode |
getThenKeywordRange(int index) |
boolean |
isTernaryIf() |
createANTLRParser, doInterpret, evalCondition, evaluateToExpressions, executeCompiled, getCompiled, getDebugLine, getIdentifierAst, getParseTimeConstant, getPrimaryRange, getPropertySelectorRange, getRange, getResultExpression, getType, interpret, interpretInCurrentNamespace, isCreatingNonModuleContextObjects, isParseTimeConstant, requiresNewNamespace, setCompiled, showInFullText, showInSurroundingText, showInText, toExpressions
getFullText, getLine, getNodeText, getText, toString
contains, getBeginIndex, getEndIndex, getLength
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFullText, getLine, getNodeText, getText
contains, getBeginIndex, getEndIndex, getLength
public ConditionalExpression(ASTInfo info, Expression ifExpression, Expression thenExpression, Expression elseExpression, Type returnType)
info
- ifExpression
- thenExpression
- elseExpression
- returnType
- public ConditionalExpression(ASTInfo info, List<Expression> ifExpressions, List<Expression> thenExpressions, Expression elseExpression, Type returnType)
info
- ifExpressions
- thenExpressions
- elseExpression
- returnType
- public <T,E extends Throwable> T accept(ExpressionVisitor<T,E> visitor) throws E extends Throwable
Expression
accept
in class Expression
E
E extends Throwable
public List<Expression> getIfExpressions()
public List<Expression> getThenExpressions()
public Expression getElseExpression()
protected Object basicInterpret(Interpreter interpreter, InterpreterStackTrace stackTrace) throws ErrorException
Expression
basicInterpret
in class Expression
ErrorException
public List<Expression> getResultExpressions()
Expression
getResultExpressions
in class Expression
public boolean isTernaryIf()
public ASTNode getIfKeywordRange(int index)
public ASTNode getThenKeywordRange(int index)
public ASTNode getElseKeywordRange()
public ASTNode getEndKeywordRange()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.