A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://github.com/clojure/tools.analyzer.js/ below:

clojure/tools.analyzer.js: Provides js-specific passes for tools.analyzer

Provides js-specific passes for tools.analyzer

THIS PROJECT HAS BEEN ABANDONED, USE cljs.analyzer INSTEAD

As of clojurescript 1.10.x, cljs.analyzer produces an AST in the same format as tools.analyzer.

The last version of tools.analyzer.js works with a very ancient version of clojurescript. This project should be considered abandoned and not be used as the official maintainer doesn't have time to update and maintain it.

user> (require '[clojure.tools.analyzer.js :as a]
               '[clojure.tools.analyzer.env :as env)
nil
user> (def env (a/global-env))
#'user/env
user> (env/with-env env (a/analyze 1))
{:op        :const,
 :top-level true,
 :tag       number,
 :env       {:context :ctx/statement, :locals {}, :ns cljs.user},
 :type      :number,
 :literal?  true,
 :val       1,
 :form      1}
user> (env/with-env env (a/analyze-ns 'cljs.core))
[{:op :ns ..}
 {:op :def ..}
 ..]

If clojure.tools.analyzer.js is used inside a cljs macro being expanded by cljs.analyzer, you can use cljs-env->env to populate tools.analyzer.js' global env from clojure.analyzer's one:

clojure.tools.analyzer.js> (env/ensure (env/with-env (merge (env/deref-env)
                                                            {:namespaces (cljs-env->env)}))
                                       ..)
Releases and Dependency Information

Latest stable release: 0.1.0-beta5

Leiningen dependency information:

[org.clojure/tools.analyzer.js "0.1.0-beta5"]

Maven dependency information:

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>tools.analyzer.js</artifactId>
  <version>0.1.0-beta5</version>
</dependency>

Copyright © 2014 Nicola Mometto, Rich Hickey & contributors.

Distributed under the Eclipse Public License, the same as Clojure.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4