ClojureScript

cljs.reader/read-string keyword parsing is inconsistent with clojure.core/read-string

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

cljs/reader.cljs:120 (def symbol-pattern (re-pattern "[:]?([^0-9/].*/)?([^0-9/][^/]*)"))
cljs/reader.cljs:330 a (re-matches* symbol-pattern token)

symbol-pattern is not consistent with clojure's interpretation of valid keywords, e.g. the following are valid keywords in clojure that are not allowed by this regex:

:0foo
:/foo/bar/baz

Activity

Hide
David Nolen added a comment -

Just because they are accepted by the reader doesn't make them valid - http://clojure.org/reader.

Unless there's some stronger evidence that this is meant to be allowed I'm inclined to close this.

Show
David Nolen added a comment - Just because they are accepted by the reader doesn't make them valid - http://clojure.org/reader. Unless there's some stronger evidence that this is meant to be allowed I'm inclined to close this.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: