Done issues

Reading comment should not throw exception
TRDR-32
support deftype/defrecord special reader syntax
TRDR-57
Update cljs.tools.reader docstrings to refer to cljs.tools.reader.edn
TRDR-56
Carriage returns in files can cause Pushback buffer overflow exception
TRDR-54
Version 1.3.0 doesn't seem to play nicely with tools.namespace
TRDR-55
Updated README and CHANGELOG
TRDR-53
Private access of cljs.tools.reader/char-code
TRDR-52
Stack overflow on whitespace in reader/read and edn/read
TRDR-11
Invalid character literal message malformed in ClojureScript
TRDR-51
Warning when using upper-limit in self-host cljs
TRDR-50
In strings, octal escapes above 0337 are considered invalid.
TRDR-47
Old tools.reader version in README docs
TRDR-48
CLJS type typo in inspect.cljs
TRDR-46
The exceptions throw when parsing fails could be much more specific and helpful.
TRDR-44
Allow wrapping constants so their location can be accessed
TRDR-42
CLJS tests cannot run with Clojure 1.9.0-SNAPSHOT and Clojurescript prior to 1.9.183
TRDR-43
Source information when reading EDN
TRDR-25
cljs.tools.reader does not handle double-colon keywords
TRDR-41
Read small maps as PersistentArrayMaps
TRDR-40
Port CLJ-1910
TRDR-39
Improve error message when trying to compile invalid octal literals
TRDR-38
tools.reader accepts `09` as number
TRDR-36
Check for duplicate keys when reading sets and maps in ClojureScript impl
TRDR-35
syntax-quote resolves on dot forms
TRDR-34
CLJS: syntax-quote doesn't auto-qualify symbols
TRDR-33
Better documentation wrt interaction between reader-types and java readers
TRDR-13
Reader supports poorly defined regexes that break code
TRDR-31
reader conditionals are broken with nil -- see CLJ-1785
TRDR-30
cljs.tools.reader performance enhancements
TRDR-28
Eliminate reflection warning in tools.reader
TRDR-27
Port tools.reader to Clojurescript
TRDR-26
Reader conditionals
TRDR-14
Improving readability by adding docstrings
TRDR-23
tools.reader accepts :*: as a keyword, inconsistent with clj and edn
TRDR-24
:column metadata for sets should be an int
TRDR-22
Consider removing support for \xHH characters
TRDR-21
starting column number too large by 1 for sets
TRDR-20
Some column numbers off when reading symbols with source-logging-push-back-reader
TRDR-19
A couple of typos in doc strings
TRDR-18
tools.reader bug demonstrated when syntax quote contains map with key :val
TRDR-17
Add more source metadata to read objects
TRDR-9
Reading Anonymous fns without arguments throws NPE
TRDR-16
tools.reader 0.8.4 causes clojurescript to stop working in mysterious ways
TRDR-15
Misplaced doc string for function newline?
TRDR-12
Add end-line and end-column metadata to read objects
TRDR-10
Fix for parsing of tagged literals
TRDR-8
Anonymous variadic fn arg not read properly
TRDR-7
read-char returns nil for some input types, on first attempt to read a char
TRDR-1
Fix a few README typos
TRDR-2
Some uses of reflection in tools.reader code slow it down unnecessarily
TRDR-6
issue 1 of 53

Reading comment should not throw exception

Description

I have notice a discrepancy in how comments are read between cljs.tools.reader/read-string and cljs.reader/read-string.

In cljs.reader, as shown here no exception is thrown but nil is returned, concretely ignoring the comment.

Conversely, the following throws:

(r/read-string {:read-cond :allow :features #{:cljs ;; comment) ;;+> EOF

In my opinion the cljs.reader is the correct one and cljs.tools.reader should be patched, but of course there might be a reason I ignore to throw an exception.

Environment

None

Status

Assignee

Nicola Mometto

Reporter

Andrea Richiardi

Labels

None

Approval

None

Patch

None

Priority

Minor
Configure