executeConditional method
dynamic
executeConditional(
- Expression testExp,
- Node consequent,
- Node? alternate
Implementation
dynamic executeConditional(
Expression testExp, Node consequent, Node? alternate) {
dynamic condition = getValueFromExpression(testExp);
bool test = toBoolean(condition);
dynamic rtn;
if (test) {
rtn = consequent.visitBy(this);
} else {
if (alternate != null) {
rtn = alternate.visitBy(this);
}
}
return rtn;
}