public object visitUnaryExpr(Expr.Unary expr) { var right = evaluate(expr.right); switch ([email protected]) { case BANG: return(!isTruthy(right)); case MINUS: checkNumberOperand(expr.@operator, right); return(-(double)right); } return(null); }
public object visitUnaryExpr(Expr.Unary expr) { resolve(expr.right); return(null); }