on this, or look into it myself otherwise.
Post by Vincent HeukenThanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to
go in and try something simple to make sure I have the right idea, so I
tried my hand at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env
:context :expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-SergeantHi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs
to be resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms
to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates
the AST to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
On Sun, Nov 29, 2015 at 4:55 PM, Vincent Heuken <
Post by Vincent HeukenI recently made an issue on the typed clojurescript sample
project's github
<https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.