visitArrayifExpr method
Implementation
@override
Object? visitArrayifExpr(Expr.Arrayif expr) {
if (isTruthy(evaluate(expr.condition))) {
return evaluate(expr.thenBranch);
} else if (expr.elseBranch != null) {
return evaluate(expr.elseBranch!);
}
return null;
}