cljs.reader doesn't support keywords starting with a digit

Description

The topic of leading digits in keywords came up separately, as they've been supported in Clojure for some time, but can now be considered part of the spec, as it were. See CLJ-1286.

BTW, this is another simple-check win...

Environment

None

Activity

Show:
Francis Avila
July 2, 2014, 9:08 PM

I think this pattern follows the specs:

Problems:

  1. Does not enforce no-repeating-colon rule (but it is easy to validate after matching).

  2. Rejects violations of first-character-rule in symbols which clojure accepts.

  3. Accepts a trailing colon on namespace (unlike clojure).

  4. Accepts foo// or :foo//, which are not clearly addressed by the specs. (Jozef's table has more background). These are both allowed in Clojure 1.6, but not 1.5 or (arguably) edn.

Francis Avila
July 3, 2014, 12:28 AM

Another problem: Accepts :::a/b, which I think is ok per the specs but is not read by 1.6. Crazy example:

Theoretically I might expect :::a/map to be read as :clojure.core/map?

import
September 10, 2015, 12:44 PM

Bumping this up, as I just scratched my head for an hour to find out this was the culprit

David Nolen
September 10, 2015, 1:15 PM

Nicolás, the premise of the ticket is that this should be supported when clearly the Clojure documentation about valid keywords states that it isn't. The Clojure implementation just happens to allow it. In anycase, this needs to be sorted out in Clojure first.

Francis Avila
September 10, 2015, 3:35 PM

I think is currently the ticket where this problem is pursued.

Assignee

Unassigned

Reporter

Chas Emerick

Labels

None

Approval

None

Patch

None

Priority

Minor
Configure