File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 8282(defn read-include-linebreak
8383 " Read until linebreak and include it."
8484 [reader]
85- (let [s (read-until reader linebreak?)
86- c (r/read-char reader)]
87- (str s c)))
85+ (str
86+ (read-until
87+ reader
88+ #(or (nil? %) (linebreak? %)))
89+ (r/read-char reader)))
8890
8991(defn string->edn
9092 " Convert string to EDN value."
Original file line number Diff line number Diff line change 187187 :token :whitespace
188188 :token ])
189189
190+ (tabular
191+ (fact " about parsing comments."
192+ (let [n (p/parse-string ?s)]
193+ n => node/printable-only?
194+ (node/tag n) => :comment
195+ (node/string n) => ?s))
196+ ?s
197+ " ; this is a comment\n "
198+ " ;; this is a comment\n "
199+ " ; this is a comment"
200+ " ;; this is a comment" )
201+
190202(tabular
191203 (fact " about parsing exceptions"
192204 (p/parse-string ?s) => (throws Exception ?p))
You can’t perform that action at this time.
0 commit comments