A tree-sitter grammar for Clojure and ClojureScript
This repository provides some files used to create various artifacts (e.g. dynamic libraries) used for handling Clojure and ClojureScript source code via tree-sitter.
Please see the what and why document for detailed information.
Install the Python binding from Git (a C compiler is needed):
pip install "tree-sitter-clojure @ git+https://github.com/Blockether/tree-sitter-clojure@v0.0.13-blockether.7"import tree_sitter, tree_sitter_clojure
parser = tree_sitter.Parser(tree_sitter.Language(tree_sitter_clojure.language()))
tree = parser.parse(b"(defn greet [who] (str \"hello \" who))")Changes may occur because:
- There may be unanticipated important use cases we may want to account for
- The grammar depends on tree-sitter which remains in flux (and is still pre 1.0)
- It's possible we missed something or got something wrong about Clojure and we might want to remedy that
Note that previously tagged versions may work fine depending on the use case. See the changelog for details.
There are some documents in the doc directory covering
topics such as:
Please see the credits.