Codn parses clojure source code into pure EDN structures.
github: https://github.com/kovasb/codn
clojars: [codn/codn "0.1.0-SNAPSHOT"]
The main use case I have in mind is doing source code analysis, but there
are others.
The clojure reader (and clojure.tools.reader) interpret reader macros, thus
returning structures that are not literally present in the source. Also,
the semantics of reader macros, constructor literals and the like are bound
to the environment, which has implications both for safety and
reproducibility.
Codn will parse source code into pure EDN data that literally represents
what was present in the source:
(require '[codn.parser.core :as p])
(p/parse-string "`a")
=> {:head :syntax-quote, :body [{:head :symbol, :value a}]}
There is also a read-codn function for reading the codn representation into
live clojure datastructures.
See the readme for more details. This is heavily WIP.
Comments welcome.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.