public Void visitIfStmt(Stmt.If stmt) { Resolve(stmt.condition); Resolve(stmt.then); if (stmt.el != null) { Resolve(stmt.el); } return(null); }
public Void visitIfStmt(Stmt.If stmt) { bool cond = IsTruthy(Evaluate(stmt.condition)); if (cond) { Execute(stmt.then); } else if (stmt.el != null) { Execute(stmt.el); } return(null); }