Skip to content

Commit 0c5ecd7

Browse files
authored
CLJS-3407: bump tools.reader to 1.3.7
* bump tools.reader to 1.3.7 (#217) * re-vendorize
1 parent 80acf18 commit 0c5ecd7

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

script/vendorize_deps

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cd src/main/clojure/cljs
77

88
DJSON_RELEASE="2.4.0"
99
TRANSIT_RELEASE="1.0.329"
10-
TREADER_RELEASE="1.3.6"
10+
TREADER_RELEASE="1.3.7"
1111

1212
rm -rf data.json
1313
git clone -b "v$DJSON_RELEASE" --depth 1 [email protected]:clojure/data.json.git

src/main/clojure/cljs/vendor/clojure/tools/reader.clj

+7-5
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@
378378
(let [o (read* rdr true nil opts pending-forms)]
379379
(if (instance? IMeta o)
380380
(let [m (if (and line (seq? o))
381-
(assoc m :line line :column column)
381+
(merge {:line line :column column} m)
382382
m)]
383383
(if (instance? IObj o)
384384
(with-meta o (merge (meta o) m))
@@ -1022,10 +1022,12 @@
10221022
([] (read+string (source-logging-push-back-reader *in*)))
10231023
([stream] (read+string stream true nil))
10241024
([^SourceLoggingPushbackReader stream eof-error? eof-value]
1025-
(let [o (log-source stream (read stream eof-error? eof-value))
1026-
s (.trim (str (:buffer @(.source-log-frames stream))))]
1025+
(let [^StringBuilder buf (doto (:buffer @(.source-log-frames stream)) (.setLength 0))
1026+
o (log-source stream (read stream eof-error? eof-value))
1027+
s (.trim (str buf))]
10271028
[o s]))
10281029
([opts ^SourceLoggingPushbackReader stream]
1029-
(let [o (log-source stream (read opts stream))
1030-
s (.trim (str (:buffer @(.source-log-frames stream))))]
1030+
(let [^StringBuilder buf (doto (:buffer @(.source-log-frames stream)) (.setLength 0))
1031+
o (log-source stream (read opts stream))
1032+
s (.trim (str buf))]
10311033
[o s])))

src/main/clojure/cljs/vendor/clojure/tools/reader/reader_types.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
[reader f]
318318
(let [frame (.source-log-frames ^SourceLoggingPushbackReader reader)
319319
^StringBuilder buffer (:buffer @frame)
320-
new-frame (assoc-in @frame [:offset] (.length buffer))]
320+
new-frame (assoc @frame :offset (.length buffer))]
321321
(with-bindings {frame new-frame}
322322
(let [ret (f)]
323323
(if (instance? clojure.lang.IObj ret)

0 commit comments

Comments
 (0)