Attached new patch trdr-14-4.diff that uses an explicit options map with a :features key to a set of features. These changes match the latest changes in clj-1424, which are patterned after a similar implementation in the Clojure edn reader.
trdr-14-5 patch is a port of the reader conditional patch at CLJ-1424. It was no fun.
two things I'm uncomfortable with:
1) use of LinkedList. it matches the Clojure version but relying on that stateful Java class is gross.
2) the READ_EOF and READ_FINISHED definitions - it's probably better to use (Object.) and identical? than what I'm doing now.
From Nicola: return-on-value is always READ_FINISHED - can we hard-code and remove from the signature?
WIP in the reader-conditionals branch https://github.com/clojure/tools.reader/tree/reader-conditionals
The additional commits on top of 7db11b110770d7c3925194a89baa8b8a773bf431 address the concerns reported by Alex in previous comments (except the use of LinkedList) and make tools.reader use the existing ReaderConditional and TaggedLiteral when available, fallbacking to a custom version when not.
This is the same approach tools.reader uses for ExceptionInfo on clojure 1.3.0 and seems to me a better approach than using different types than clojure itself (when they are available) but I'd like some feedback on this (commit 2c3adbe4c4f0fab8087380ff0dbb1ad44c8739e1)
The additional commits also fix a couple of bugs wrt handling of eof