I was wondering if there is a possibility to read arbitrary clojure code but sort of ignore the read-eval feature. So instead of throwing an error when *read-eval* is false, it just ignores it. Something along the lines of
(require '[clojure.tools.reader :as r])
(require '[clojure.tools.reader.reader-types :as t])
(binding [r/*ignore-read-eval* true]
(r/read (t/source-logging-push-back-reader "#=(+ 3 4)")))
=> (read-eval (+ 3 4))
I am mainly interested in the column/line info of the metadata, so if this is out of scope for the library or there is a better way to this feel free to point me somewhere else. Also happy to do a pull request if that is wanted.