Skip to content

Commit

Permalink
Upgrade to tools.reader 1.4.2 (clojure#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
swannodette authored and cooljeanius committed Nov 19, 2024
1 parent 4f9f23a commit 15ce888
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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.7"
TREADER_RELEASE="1.4.2"

rm -rf data.json
git clone -b "v$DJSON_RELEASE" --depth 1 git@github.com:clojure/data.json.git
Expand Down
8 changes: 5 additions & 3 deletions src/main/clojure/cljs/vendor/clojure/tools/reader.clj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
java.util.regex.Pattern
(java.util List LinkedList)))

(set! *warn-on-reflection* true)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; helpers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down Expand Up @@ -759,7 +761,7 @@
(ns-name *ns*)

(= \: (first token))
(some-> token (subs 1) parse-symbol second' symbol resolve-ns ns-name)
(some-> token (subs 1) parse-symbol second' symbol resolve-ns)

:else
(some-> token parse-symbol second'))]
Expand Down Expand Up @@ -1022,12 +1024,12 @@
([] (read+string (source-logging-push-back-reader *in*)))
([stream] (read+string stream true nil))
([^SourceLoggingPushbackReader stream eof-error? eof-value]
(let [^StringBuilder buf (doto (:buffer @(.source-log-frames stream)) (.setLength 0))
(let [^StringBuilder buf (doto ^StringBuilder (: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 [^StringBuilder buf (doto (:buffer @(.source-log-frames stream)) (.setLength 0))
(let [^StringBuilder buf (doto ^StringBuilder (:buffer @(.source-log-frames stream)) (.setLength 0))
o (log-source stream (read opts stream))
s (.trim (str buf))]
[o s])))

0 comments on commit 15ce888

Please sign in to comment.