Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added reader support for special symbols nil, true, false. Refs CLJS-47

  • Loading branch information...
commit 4a2f49a255bd646e5c967f1921908b3eea922615 1 parent 0268421
@fogus fogus authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/cljs/cljs/reader.cljs
9 src/cljs/cljs/reader.cljs
@@ -237,9 +237,9 @@ nil if the end of stream has been reached")
:default (recur (do (.append buffer ch) buffer) (read-char reader)))))
(def special-symbols
- {'nil nil
- 'true true
- 'false false})
+ {"nil" nil
+ "true" true
+ "false" false})
(defn read-symbol
[reader initch]
@@ -247,8 +247,7 @@ nil if the end of stream has been reached")
(if (gstring/contains token "/")
(symbol (subs token 0 (.indexOf token "/"))
(subs (inc (.indexOf token "/")) (.length token)))
- (let [s (symbol token)]
- (s special-symbols s)))))
+ (get special-symbols token (symbol token)))))
(defn read-keyword
[reader initch]
Please sign in to comment.
Something went wrong with that request. Please try again.