- Upgrade ClojureScript to 0.0-2138
- Rename all
clojure.tools.analyzer.*namespace prefixs toclojure.jvm.tools.analyzer.*- Includes CLJS:
cljs.tools.analyzer->cljs.jvm.tools.analyzer - Migration path: immediately rename your references to the old namespaces (there is no migration path)
- This change is urgent and necessary to eliminate stepping on the new contribs
clojure.tools.analyzerandclojure.tools.analyzer.jvm
- Includes CLJS:
- Add dynamic var
clojure.jvm.tools.analyzer/*eval-ast*to toggle automatic evaluation of AST's- defaults to evaluating the AST after analysis
- Fix expr-seq
- Change interface to analyze-ns
- takes a namespace symbol and options. See docstring
- add hinted fields to deftype*
- add analyze-file
- add :source-path to env, the current file being analyzed
- Support Clojurescript
- Add set! to map->form
- Remove tools.trace for Maven builds (still in project.clj)
- Add macroexpanders
- Increment minor version because of breaking changes to :children
- Eliminate CHILDREN and JAVA-OBJ global state
- AST ops now accept an optional map of options
eg.
(ast (let [a 1] a) {:children true})
- AST ops now accept an optional map of options
eg.
- Experimental approach to children keys
- :children is a vector of vector key-value pairs (similar in structure to an ordered map)
- keys are a vector representing the path to the child expression, for use with
get-in - values are a map of options
- empty options indicate the child is a normal expression
- :exprs? set to
trueindicates child is a sequence of expressions
eg. :children of the :if node
[[[:the-expr] {}]
[[:tests] {:exprs? true}]
[[:thens] {:exprs? true}]
[[:default] {}]]})eg. How to iterate over these children
(let [expr (ast (let [a 1] a) {:children true})]
(for [[path {:keys [exprs?]}] (:children expr)
:let [in (get-in expr path)]
child-expr (if exprs?
in
[in])]
;child-expr here is the child expr
))- Add column numbers for Clojure 1.5.0+
- Remove
jvmfrom namespaces - Add
map->formcase
- New Hygienic transformation namespace,
analyze.hygieneast-hy, AST -> hygienic ASTemit-hy, hygienic AST -> hygienic form
map->formnow extensible- Fix emitting variadic method twice in
map->formcase for :fn-expr
- More macroexpansion cases
evalforms after analysing them- changes to :deftype*
- More cases for
map->form - Fix :fn-expr case for
map->form, now emitsfn*instead offn
- More cases for
map->form
- Add
analyze.emit-form/map->form - Support Clojure 1.4.0+
- Revert to not
evaling forms before analysing
evalforms before analysing them