Skip to content

Commit

Permalink
CLJS-3407: bump tools.reader to 1.3.7
Browse files Browse the repository at this point in the history
* bump tools.reader to 1.3.7 (#217) 
* re-vendorize
  • Loading branch information
swannodette authored Nov 17, 2023
1 parent 80acf18 commit 0c5ecd7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion script/vendorize_deps
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cd src/main/clojure/cljs

DJSON_RELEASE="2.4.0"
TRANSIT_RELEASE="1.0.329"
TREADER_RELEASE="1.3.6"
TREADER_RELEASE="1.3.7"

rm -rf data.json
git clone -b "v$DJSON_RELEASE" --depth 1 [email protected]:clojure/data.json.git
Expand Down
12 changes: 7 additions & 5 deletions src/main/clojure/cljs/vendor/clojure/tools/reader.clj
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@
(let [o (read* rdr true nil opts pending-forms)]
(if (instance? IMeta o)
(let [m (if (and line (seq? o))
(assoc m :line line :column column)
(merge {:line line :column column} m)
m)]
(if (instance? IObj o)
(with-meta o (merge (meta o) m))
Expand Down Expand Up @@ -1022,10 +1022,12 @@
([] (read+string (source-logging-push-back-reader *in*)))
([stream] (read+string stream true nil))
([^SourceLoggingPushbackReader stream eof-error? eof-value]
(let [o (log-source stream (read stream eof-error? eof-value))
s (.trim (str (:buffer @(.source-log-frames stream))))]
(let [^StringBuilder buf (doto (:buffer @(.source-log-frames stream)) (.setLength 0))
o (log-source stream (read stream eof-error? eof-value))
s (.trim (str buf))]
[o s]))
([opts ^SourceLoggingPushbackReader stream]
(let [o (log-source stream (read opts stream))
s (.trim (str (:buffer @(.source-log-frames stream))))]
(let [^StringBuilder buf (doto (:buffer @(.source-log-frames stream)) (.setLength 0))
o (log-source stream (read opts stream))
s (.trim (str buf))]
[o s])))
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
[reader f]
(let [frame (.source-log-frames ^SourceLoggingPushbackReader reader)
^StringBuilder buffer (:buffer @frame)
new-frame (assoc-in @frame [:offset] (.length buffer))]
new-frame (assoc @frame :offset (.length buffer))]
(with-bindings {frame new-frame}
(let [ret (f)]
(if (instance? clojure.lang.IObj ret)
Expand Down

0 comments on commit 0c5ecd7

Please sign in to comment.