public Void VisitIfStmt(Stmt.If stmt) { Resolve(stmt.condition); Resolve(stmt.thenBranch); if (stmt.elseBranch != null) { Resolve(stmt.elseBranch); } return(null); }
public Void VisitIfStmt(Stmt.If stmt) { if (IsTruthy(Evaluate(stmt.condition))) { Execute(stmt.thenBranch); } else if (stmt.elseBranch != null) { Execute(stmt.elseBranch); } return(null); }