visitIfStmt method

  1. @override
void visitIfStmt(
  1. If stmt
)
override

Implementation

@override
void visitIfStmt(Stmt.If stmt) {
  if (isTruthy(evaluate(stmt.condition))) {
    execute(stmt.thenBranch);
  } else if (stmt.elseBranch != null) {
    execute(stmt.elseBranch!);
  }
  return;
}