|
133 | 133 | "Evaluate the given expression where `v` is bound to the currently inspected
|
134 | 134 | value. Open the evaluation result in the inspector."
|
135 | 135 | [inspector expr]
|
136 |
| - (let [{:keys [index path current-page page-size value]} inspector |
| 136 | + (let [{:keys [current-page value]} inspector |
137 | 137 | eval-fn `(fn [~'v] ~(read-string expr))
|
138 | 138 | result ((eval eval-fn) value)]
|
139 | 139 | (-> (update inspector :stack conj value)
|
|
204 | 204 |
|
205 | 205 | (defmulti inspect-value #'value-types)
|
206 | 206 |
|
207 |
| -(defmethod inspect-value nil [value] |
| 207 | +(defmethod inspect-value nil [_value] |
208 | 208 | "nil")
|
209 | 209 |
|
210 | 210 | (defmethod inspect-value :atom [value]
|
|
360 | 360 | inspector))
|
361 | 361 |
|
362 | 362 | ;; Inspector multimethod
|
363 |
| -(defn known-types [ins obj] |
| 363 | +(defn known-types [_ins obj] |
364 | 364 | (cond
|
365 | 365 | (nil? obj) :nil
|
366 | 366 | (map? obj) :coll
|
|
375 | 375 | (instance? List obj) :coll
|
376 | 376 | (instance? Map obj) :coll
|
377 | 377 | (.isArray (class obj)) :array
|
378 |
| - :default (or (:inspector-tag (meta obj)) |
379 |
| - (type obj)))) |
| 378 | + :else (or (:inspector-tag (meta obj)) |
| 379 | + (type obj)))) |
380 | 380 |
|
381 | 381 | (defmulti inspect #'known-types)
|
382 | 382 |
|
383 |
| -(defmethod inspect :nil [inspector obj] |
| 383 | +(defmethod inspect :nil [inspector _obj] |
384 | 384 | (-> inspector
|
385 | 385 | (render-ln "nil")))
|
386 | 386 |
|
|
459 | 459 | (render-fields "Fields:" non-static)
|
460 | 460 | (render-fields "Static fields:" static)))))
|
461 | 461 |
|
462 |
| -(defn- render-class-section [inspector obj section] |
463 |
| - (let [method (symbol (str ".get" (name section))) |
464 |
| - elements (eval (list method obj))] |
465 |
| - (if (seq elements) |
466 |
| - `(~(name section) ": " (:newline) |
467 |
| - ~@(mapcat (fn [f] |
468 |
| - `(" " (:value ~f) (:newline))) elements))))) |
469 |
| - |
470 | 462 | (defn- render-section [obj inspector section]
|
471 | 463 | (let [method (symbol (str ".get" (name section)))
|
472 | 464 | elements (eval (list method obj))]
|
|
517 | 509 | (render-ln inspector "Var: #'" ns "/" sym)
|
518 | 510 | (= type :expr)
|
519 | 511 | (render-ln inspector "Expr: " expr)
|
520 |
| - :default |
| 512 | + :else |
521 | 513 | inspector)))
|
522 | 514 |
|
523 | 515 | (defn render-path [inspector]
|
|
0 commit comments