tools.reader

Port tools.reader to Clojurescript

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Patch:
    Code and Test

Description

As part of the effort to get the Clojurescript compiler bootstrapped,
this is a patch porting org.clojure/tools.reader to clojurescript.

The port follows the Clojure implementation quite closely, except in the case of:

  • Numbers: all numbers are reduced to js/Number
  • Chars: reduced to string as in Clojurescript
  • Macros: only used to compile in/out features (not) available in cljs builds
  • There is no `(defn read [] ...)` zero arity implementation as we don't have `in`
  • Custom implementation of clojure.lang.RT/nextID using an atom
  • Run tests using: `lein cljsbuild test`

Contributors: Andrew Mcveigh, Jonathan Boston, Nicola Mometto and Thomas G. Kristensen

Activity

Hide
Nicola Mometto added a comment -

Andrew, thanks a lot. Can you please attach a patch created with `git format patch`? This is what clojure requires, to track authorship: http://dev.clojure.org/display/community/Creating+Tickets

It will need to be a single commit. You can use a `Also-by:` field to share authorship

Show
Nicola Mometto added a comment - Andrew, thanks a lot. Can you please attach a patch created with `git format patch`? This is what clojure requires, to track authorship: http://dev.clojure.org/display/community/Creating+Tickets It will need to be a single commit. You can use a `Also-by:` field to share authorship
Hide
Andrew Mcveigh added a comment -

Resubmit patch in required format

Show
Andrew Mcveigh added a comment - Resubmit patch in required format
Hide
Nicola Mometto added a comment -

Pushed with a couple of changes, most notably it depends on cljs >=3308 rather than trying to backport.

Show
Nicola Mometto added a comment - Pushed with a couple of changes, most notably it depends on cljs >=3308 rather than trying to backport.
Hide
Andrew Mcveigh added a comment -

Ah, good. I was a bit uncomfortable about the version check macros being there, but decided to take the lead of the Clojure version.

Show
Andrew Mcveigh added a comment - Ah, good. I was a bit uncomfortable about the version check macros being there, but decided to take the lead of the Clojure version.
Hide
Nicola Mometto added a comment -

cljs is a moving target and updates much frequently then clj, no interest in keeping compatibility with older versions (cljs itself depends on clj 1.7.0-rc1)

Show
Nicola Mometto added a comment - cljs is a moving target and updates much frequently then clj, no interest in keeping compatibility with older versions (cljs itself depends on clj 1.7.0-rc1)

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: