On Friday, January 10, 2014 7:23:56 PM UTC-6, Nicola Mometto wrote: > > > Today I released the first version of the tools.analyzer[1] and > tools.analyzer.jvm[2] contrib libraries, here are the leiningen > coordinates: > > [org.clojure/tools.analyzer "0.1.0-alpha1"] > [org.clojure/tools.analyzer.jvm "0.1.0-alpha1"] > > Right now the only documentation for both those libraries is in the form > of docstrings and can be found at > http://clojure.github.io/tools.analyzer/ and > http://clojure.github.io/tools.analyzer.jvm/ more extended documentation > will be available before the first non-alpha release, hopefully very soon. >
Hi, I've begun experimenting with this and I wonder if there is any further documentation or more extensive examples. So far I'm just trying to use walk, prewalk, postwalk to crawl an AST, but I think I must be doing something wrong. Using analyze on something like "(do (def a 1) (def b 2))" I would expect four leaf nodes, a, 1, b, and 2, but using postwalk I bottom out on the whole subexpressions (def a 1) and (def b 2). Also, location data (file, col, line) appears to not be subordinate to the node it describes, so I must be misinterpreting something. I want to do the basic DOM -like stuff like get-parent, get-first-child, etc., but dumping a node produces a vast amount of data whose structure isn't really clear to me. I can access :children, which is a vector, but I don't see how to descend in the tree. Thanks for any help, Gregg -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com 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 clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.