Uploaded image for project: 'tools.reader'
  1. TRDR-41

cljs.tools.reader does not handle double-colon keywords

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Declined
    • Labels:
    • Environment:

      Clojure 1.9.0-alpha14 with ClojureScript 1.9.293.

      Description

      In tools.reader 1.0.0-beta3, cljs.tools.reader/read-string incorrectly parses double-colon keywords such as ::blah and ::s/blah.

      (read-string "::blah") returns a keyword with an empty-string namespace "", equivalent to:

      (keyword "" "blah")
      

      (read-string "::s/blah") throws a reader exception:

      #error {:message "Invalid token: ::s/test", :data {:type :reader-exception}}.
      

      In contrast, the JVM Clojure version returns the expected contextually namespaced keywords.

        Attachments

          Activity

            People

            • Assignee:
              bronsa Nicola Mometto
              Reporter:
              alex+import import
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: