Tightening LispReader

196 views
Skip to first unread message

Christophe Grand

unread,
Apr 24, 2017, 5:14:57 AM4/24/17
to clojure-dev
In a couple of places, where it is expected to read something immediately (like the tag of a tagged literal or the ns of a namespaced map), the reader allows spaces or "no-op" forms to sneak in.
This is because the test for immediacy doesn't take into account "no op" readers.

For example here is a namespaced map (use read-string or a plain repl):
#:#_()#! bang bang
#?(:whatever 42); now a blank line

#?@(:default ())foo
{:bar :baz}

And here is an inst:
##_()#! bang bang
#?(:whatever 42); now a blank line
{:bar :baz}
inst "2017-04-24T09:11:29.878-00:00"

May I open a ticket to fix that?
(and another one for %arguments which accept any kind of numbers and not just natural integers in base 10)

Thanks,

Christophe





--
On Clojure http://clj-me.cgrand.net/
Clojure Programming http://clojurebook.com
Training, Consulting & Contracting http://lambdanext.eu/

Alex Miller

unread,
Apr 24, 2017, 11:26:17 AM4/24/17
to cloju...@googlegroups.com
sure

--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev+unsubscribe@googlegroups.com.
To post to this group, send email to cloju...@googlegroups.com.
Visit this group at https://groups.google.com/group/clojure-dev.
For more options, visit https://groups.google.com/d/optout.

Christophe Grand

unread,
Apr 25, 2017, 7:24:08 AM4/25/17
to clojure-dev
Reply all
Reply to author
Forward
0 new messages