Commonlisp grammar for tree-sitter
Project description
tree-sitter-commonlisp
WIP. Goal is to have a better syntax highlighting for Neovim and some semantic refactoring https://github.com/nvim-treesitter/nvim-treesitter-refactor/.
All praise goes to https://github.com/sogaiu/tree-sitter-clojure which is extended by this grammar.
TODOs:
- support number literals that are different from clojure (e.g.
.9
)
Macros with special respresentation in syntax tree (when written with lowercase letters):
- defun and friends (e.g. defmethod)
- loop macro
This grammar is used in https://github.com/Wilfred/difftastic to generate syntax-ware diffs for Common Lisp.
Usage
-
C/C++
- compilation run
make
(optionalmake install
) - Follow the Guide on using tree-sitter parsers
- set
tree_sitter_commonlisp()
as language on your Tree-Sitter parser fromtree_sitter_commonlisp.h
ts_parser_set_language(parser, tree_sitter_json());
- compilation run
-
Python (
pip install tree-sitter-commonlisp tree-sitter
) https://github.com/tree-sitter-grammars/tree-sitter-commonlisp/blob/4d2a2247bb0ec117193ef33e3ce546a6781c5bf5/bindings/python/tests/test_import.py#L15-L23 -
Rust
cargo add tree-sitter tree-sitter-grammars
https://github.com/tree-sitter-grammars/tree-sitter-commonlisp/blob/4d2a2247bb0ec117193ef33e3ce546a6781c5bf5/bindings/rust/lib.rs#L47-L50
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file tree_sitter_commonlisp-0.4.1.tar.gz
.
File metadata
- Download URL: tree_sitter_commonlisp-0.4.1.tar.gz
- Upload date:
- Size: 238.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b8fc7e1ae7faf29d8f656970e25c660b13857e39b55d4a13bcee06ccf3e79c4 |
|
MD5 | 494587a4b2b2acbda2ace55f49088b08 |
|
BLAKE2b-256 | 06c5503a9cc9e8ca02387f4424742964242499a407fb8451501ec24e71babc8b |
File details
Details for the file tree_sitter_commonlisp-0.4.1-cp38-abi3-win_arm64.whl
.
File metadata
- Download URL: tree_sitter_commonlisp-0.4.1-cp38-abi3-win_arm64.whl
- Upload date:
- Size: 108.0 kB
- Tags: CPython 3.8+, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fca0ea03b60e7f940d466e9c3e757246e8e172d79d4903d2294ab5e73e235eb5 |
|
MD5 | 04b33cb72d60995c0db1ae979b869214 |
|
BLAKE2b-256 | 34761022ce8ec204ef45ce0d2e7e5b42164d0729212135df49eed2fc3ffa115a |
File details
Details for the file tree_sitter_commonlisp-0.4.1-cp38-abi3-win_amd64.whl
.
File metadata
- Download URL: tree_sitter_commonlisp-0.4.1-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 110.0 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5990660d55567565fee2dd609b4500c6fd0049c82d5ea195779d7c6dd78a75cc |
|
MD5 | 3fa517b28a9ada5a9dfa8abcae7a5356 |
|
BLAKE2b-256 | dfa26824c0b84c67f3d4a3855073c7a17273d677ccafbe5779c9a49eb3ef29eb |
File details
Details for the file tree_sitter_commonlisp-0.4.1-cp38-abi3-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: tree_sitter_commonlisp-0.4.1-cp38-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 117.1 kB
- Tags: CPython 3.8+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3870af93d02039116a8ee1e325bf9b892cb593819e6dbd16ba2971a8f245c0ab |
|
MD5 | c0c856556003de6fb4bb91e8bc2bd4b2 |
|
BLAKE2b-256 | 5029b9b0519ad3b7cc39201241367c10aa28b1055b2a35d4f4d292d9b6bb1ccc |
File details
Details for the file tree_sitter_commonlisp-0.4.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: tree_sitter_commonlisp-0.4.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 132.1 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33ed313aa0d75172a84b816fad3d3d4aa803cc3bd672a3165c5a594e345c2c61 |
|
MD5 | e58931068f437c4671645bfa7cd29d0b |
|
BLAKE2b-256 | 3fef0446ee7d5ebc25f384de6fd3a9bb203ff9b701b82ee604967dc11d0c9552 |
File details
Details for the file tree_sitter_commonlisp-0.4.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tree_sitter_commonlisp-0.4.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 122.9 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd130f1866009e0b9000d0f11db061fbc0499a0b5b053e4d1f36b9b5cd1f2ef8 |
|
MD5 | 3afdb9bb86a357d92da4d57dfa5c43aa |
|
BLAKE2b-256 | 326f6f42b794a2fa1d69dd34f9ce887839065a8b32405cd613733a6d2ef83da1 |
File details
Details for the file tree_sitter_commonlisp-0.4.1-cp38-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: tree_sitter_commonlisp-0.4.1-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 112.8 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 378a5b3597c0bcd9d65b79b4dae664f4966ccf4fa72fab0f8f08e351d861596d |
|
MD5 | a8b9671335e8cc63b4eb9ac8ca9203ed |
|
BLAKE2b-256 | 10e8d241bf4d543fb982d3eb39dbda68a42f960a236f802dd012766bf305e041 |
File details
Details for the file tree_sitter_commonlisp-0.4.1-cp38-abi3-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: tree_sitter_commonlisp-0.4.1-cp38-abi3-macosx_10_9_x86_64.whl
- Upload date:
- Size: 107.0 kB
- Tags: CPython 3.8+, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 011ad2788ad8517cc7e96220b5442d32f0b95f002be1ae6db0491e123b9f16d2 |
|
MD5 | 68a299d95302ac5448f4e5a06e93c0cf |
|
BLAKE2b-256 | b5247fda258e5aeb8665d7a5d0d6b94f262fb795f014c399f6ec51768b0bea23 |