visitConditionalExpr method

  1. @override
Object? visitConditionalExpr(
  1. Conditional expr
)
override

Implementation

@override
Object? visitConditionalExpr(Expr.Conditional expr) {
  if (isTruthy(evaluate(expr.condition))) {
    return evaluate(expr.thenBranch);
  } else {
    return evaluate(expr.elseBranch);
  }
}