dom-tree-sitter-language-pack


Namedom-tree-sitter-language-pack JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
SummaryExtensive Language Pack for Tree-Sitter
upload_time2025-02-15 08:15:55
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9.0
licenseCopyright 2024-2025 Na'aman Hirschfeld Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Copyright 2022 Grant Jenks Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords code text-processing tree-sitter
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tree Sitter Language Pack

This package bundles a comprehensive collection of [tree-sitter](https://tree-sitter.github.io/tree-sitter/) languages
as both source distribution and pre-built wheels.

## Installation

```bash
pip install tree-sitter-language-pack
```

## Important Notes:

- This package started life as a maintained and updated fork of
  [tree-sitter-languages](https://github.com/grantjenks/py-tree-sitter-languages) by Grant Jenks, and it
  incorporates code contributed by ObserverOfTime (see
  this [PR](https://github.com/grantjenks/py-tree-sitter-languages/pull/65)).
- This package is MIT licensed and the original package of which this is a fork has an Apache 2.0 License. Both licenses
  are available in the LICENSE file.
- All languages bundled by this package are licensed under permissive open-source licenses (MIT, Apache 2.0 etc.) only -
  no GPL
  licensed languages are included.
- This library is compatible with [tree-sitter](https://tree-sitter.github.io/tree-sitter/) v0.22.0 and above.

## Features

- 100+ Languages: Support for all major programming languages and many domain-specific languages
- Pre-built Wheels: Easy installation with no compilation required
- Type-Safe: Full typing support for better IDE integration and code safety
- Zero GPL Dependencies: All bundled languages use permissive licenses (MIT, Apache 2.0, etc.)

## Usage

This library exposes two functions `get_language` and `get_parser`.

```python
from tree_sitter_language_pack import get_binding, get_language, get_parser

python_binding = get_binding('python')  # this is an int pointing to the C binding
python_lang = get_language('python')  # this is an instance of tree_sitter.Language
python_parser = get_parser('python')  # this is an instance of tree_sitter.Parser
```

See the list of available languages below to get the name of the language you want to use.

## Available Languages:

Each language below is identified by the key used to retrieve it from the `get_language` and `get_parser` functions.

- [actionscript](https://github.com/Rileran/tree-sitter-actionscript) - MIT License
- [ada](https://github.com/briot/tree-sitter-ada) - MIT License
- [agda](https://github.com/tree-sitter/tree-sitter-agda) - MIT License
- [arduino](https://github.com/tree-sitter-grammars/tree-sitter-arduino) - MIT License
- [asm](https://github.com/rush-rs/tree-sitter-asm) - MIT License
- [astro](https://github.com/virchau13/tree-sitter-astro) - MIT License
- [bash](https://github.com/tree-sitter/tree-sitter-bash) - MIT License
- [beancount](https://github.com/polarmutex/tree-sitter-beancount) - MIT License
- [bibtex](https://github.com/latex-lsp/tree-sitter-bibtex) - MIT License
- [bicep](https://github.com/tree-sitter-grammars/tree-sitter-bicep) - MIT License
- [bitbake](https://github.com/tree-sitter-grammars/tree-sitter-bitbake) - MIT License
- [c](https://github.com/tree-sitter/tree-sitter-c) - MIT License
- [cairo](https://github.com/tree-sitter-grammars/tree-sitter-cairo) - MIT License
- [capnp](https://github.com/tree-sitter-grammars/tree-sitter-capnp) - MIT License
- [chatito](https://github.com/tree-sitter-grammars/tree-sitter-chatito) - MIT License
- [clarity](https://github.com/xlittlerag/tree-sitter-clarity) - MIT License
- [clojure](https://github.com/sogaiu/tree-sitter-clojure) - CC0 1.0 Universal License
- [cmake](https://github.com/uyha/tree-sitter-cmake) - MIT License
- [comment](https://github.com/stsewd/tree-sitter-comment) - MIT License
- [commonlisp](https://github.com/tree-sitter-grammars/tree-sitter-commonlisp) - MIT License
- [cpon](https://github.com/tree-sitter-grammars/tree-sitter-cpon) - MIT License
- [cpp](https://github.com/tree-sitter/tree-sitter-cpp) - MIT License
- [csharp](https://github.com/tree-sitter/tree-sitter-c-sharp) - MIT License
- [css](https://github.com/tree-sitter/tree-sitter-css) - MIT License
- [csv](https://github.com/tree-sitter-grammars/tree-sitter-csv) - MIT License
- [cuda](https://github.com/tree-sitter-grammars/tree-sitter-cuda) - MIT License
- [d](https://github.com/gdamore/tree-sitter-d) - MIT License
- [dart](https://github.com/UserNobody14/tree-sitter-dart) - MIT License
- [dockerfile](https://github.com/camdencheek/tree-sitter-dockerfile) - MIT License
- [doxygen](https://github.com/tree-sitter-grammars/tree-sitter-doxygen) - MIT License
- [elisp](https://github.com/Wilfred/tree-sitter-elisp) - MIT License
- [elixir](https://github.com/elixir-lang/tree-sitter-elixir) - MIT License
- [elm](https://github.com/elm-tooling/tree-sitter-elm) - MIT License
- [embeddedtemplate](https://github.com/tree-sitter/tree-sitter-embedded-template) - MIT License
- [erlang](https://github.com/WhatsApp/tree-sitter-erlang) - MIT License
- [fennel](https://github.com/TravonteD/tree-sitter-fennel) - MIT License
- [firrtl](https://github.com/tree-sitter-grammars/tree-sitter-firrtl) - Apache License 2.0
- [fish](https://github.com/ram02z/tree-sitter-fish) - Unlicense license
- [fortran](https://github.com/stadelmanma/tree-sitter-fortran) - MIT License
- [func](https://github.com/tree-sitter-grammars/tree-sitter-func) - MIT License
- [gdscript](https://github.com/PrestonKnopp/tree-sitter-gdscript) - MIT License
- [gitattributes](https://github.com/tree-sitter-grammars/tree-sitter-gitattributes) - MIT License
- [gitcommit](https://github.com/gbprod/tree-sitter-gitcommit) - WTFPL License
- [gitignore](https://github.com/shunsambongi/tree-sitter-gitignore) - MIT License
- [gleam](https://github.com/gleam-lang/tree-sitter-gleam) - Apache-2.0 license
- [glsl](https://github.com/tree-sitter-grammars/tree-sitter-glsl) - MIT License
- [gn](https://github.com/tree-sitter-grammars/tree-sitter-gn) - MIT License
- [go](https://github.com/tree-sitter/tree-sitter-go) - MIT License
- [gomod](https://github.com/camdencheek/tree-sitter-go-mod) - MIT License
- [gosum](https://github.com/tree-sitter-grammars/tree-sitter-go-sum) - MIT License
- [groovy](https://github.com/Decodetalkers/tree-sitter-groovy) - MIT License
- [gstlaunch](https://github.com/tree-sitter-grammars/tree-sitter-gstlaunch) - MIT License
- [hack](https://github.com/slackhq/tree-sitter-hack) - MIT License
- [hare](https://github.com/tree-sitter-grammars/tree-sitter-hare) - MIT License
- [haskell](https://github.com/tree-sitter/tree-sitter-haskell) - MIT License
- [haxe](https://github.com/vantreeseba/tree-sitter-haxe) - MIT License
- [hcl](https://github.com/tree-sitter-grammars/tree-sitter-hcl) - Apache License 2.0
- [heex](https://github.com/phoenixframework/tree-sitter-heex) - MIT License
- [hlsl](https://github.com/tree-sitter-grammars/tree-sitter-hlsl) - MIT License
- [html](https://github.com/tree-sitter/tree-sitter-html) - MIT License
- [hyprlang](https://github.com/tree-sitter-grammars/tree-sitter-hyprlang) MIT License
- [ispc](https://github.com/tree-sitter-grammars/tree-sitter-ispc) - MIT License
- [janet](https://github.com/GrayJack/tree-sitter-janet) - BSD-3-Clause license
- [java](https://github.com/tree-sitter/tree-sitter-java) - MIT License
- [javascript](https://github.com/tree-sitter/tree-sitter-javascript) - MIT License
- [jsdoc](https://github.com/tree-sitter/tree-sitter-jsdoc) - MIT License
- [json](https://github.com/tree-sitter/tree-sitter-json) - MIT License
- [jsonnet](https://github.com/sourcegraph/tree-sitter-jsonnet) - MIT License
- [julia](https://github.com/tree-sitter/tree-sitter-julia) - MIT License
- [kconfig](https://github.com/tree-sitter-grammars/tree-sitter-kconfig) - MIT License
- [kdl](https://github.com/tree-sitter-grammars/tree-sitter-kdl) - MIT License
- [kotlin](https://github.com/fwcd/tree-sitter-kotlin) - MIT License
- [linkerscript](https://github.com/tree-sitter-grammars/tree-sitter-linkerscript) - MIT License
- [llvm](https://github.com/benwilliamgraham/tree-sitter-llvm) - MIT License
- [lua](https://github.com/tree-sitter-grammars/tree-sitter-lua) - MIT License
- [luadoc](https://github.com/tree-sitter-grammars/tree-sitter-luadoc) - MIT License
- [luap](https://github.com/tree-sitter-grammars/tree-sitter-luap) - MIT License
- [luau](https://github.com/tree-sitter-grammars/tree-sitter-luau) - MIT License
- [magik](https://github.com/krn-robin/tree-sitter-magik) - MIT License
- [make](https://github.com/tree-sitter-grammars/tree-sitter-make) - MIT License
- [markdown](https://github.com/tree-sitter-grammars/tree-sitter-markdown) - MIT License
- [matlab](https://github.com/acristoffers/tree-sitter-matlab) - MIT License
- [mermaid](https://github.com/monaqa/tree-sitter-mermaid) - MIT License
- [meson](https://github.com/tree-sitter-grammars/tree-sitter-meson) - MIT License
- [ninja](https://github.com/alemuller/tree-sitter-ninja) - MIT License
- [nix](https://github.com/nix-community/tree-sitter-nix) - MIT License
- [nqc](https://github.com/tree-sitter-grammars/tree-sitter-nqc) - MIT License
- [objc](https://github.com/tree-sitter-grammars/tree-sitter-objc) - MIT License
- [odin](https://github.com/tree-sitter-grammars/tree-sitter-odin) - MIT License
- [org](https://github.com/milisims/tree-sitter-org) - MIT License
- [pascal](https://github.com/Isopod/tree-sitter-pascal) - MIT License
- [pem](https://github.com/tree-sitter-grammars/tree-sitter-pem) - MIT License
- [perl](https://github.com/tree-sitter-perl/tree-sitter-perl) - Artistic License 2.0
- [pgn](https://github.com/rolandwalker/tree-sitter-pgn) - BSD-2-Clause license
- [php](https://github.com/tree-sitter/tree-sitter-php) - MIT License
- [po](https://github.com/tree-sitter-grammars/tree-sitter-po) - MIT License
- [pony](https://github.com/tree-sitter-grammars/tree-sitter-pony) - MIT License
- [powershell](https://github.com/airbus-cert/tree-sitter-powershell) - MIT License
- [printf](https://github.com/tree-sitter-grammars/tree-sitter-printf) - ISC License
- [prisma](https://github.com/LumaKernel/tree-sitter-prisma) - MIT License
- [properties](https://github.com/tree-sitter-grammars/tree-sitter-properties) - MIT License
- [proto](https://github.com/coder3101/tree-sitter-proto) - MIT License
- [psv](https://github.com/amaanq/tree-sitter-csv) - MIT License
- [puppet](https://github.com/tree-sitter-grammars/tree-sitter-puppet) - MIT License
- [purescript](https://github.com/postsolar/tree-sitter-purescript) - MIT License
- [pymanifest](https://github.com/tree-sitter-grammars/tree-sitter-pymanifest) - MIT License
- [python](https://github.com/tree-sitter/tree-sitter-python) - MIT License
- [qmldir](https://github.com/tree-sitter-grammars/tree-sitter-qmldir) - MIT License
- [query](https://github.com/tree-sitter-grammars/tree-sitter-query) - Apache License 2.0
- [r](https://github.com/r-lib/tree-sitter-r) - MIT License
- [racket](https://github.com/6cdh/tree-sitter-racket) - MIT License
- [rbs](https://github.com/joker1007/tree-sitter-rbs) - MIT License
- [re2c](https://github.com/tree-sitter-grammars/tree-sitter-re2c) - MIT License
- [readline](https://github.com/tree-sitter-grammars/tree-sitter-readline) - MIT License
- [requirements](https://github.com/tree-sitter-grammars/tree-sitter-requirements) - MIT License
- [ron](https://github.com/tree-sitter-grammars/tree-sitter-ron) - Apache License 2.0
- [rst](https://github.com/stsewd/tree-sitter-rst) - MIT License
- [ruby](https://github.com/tree-sitter/tree-sitter-ruby) - MIT License
- [rust](https://github.com/tree-sitter/tree-sitter-rust) - MIT License
- [scala](https://github.com/tree-sitter/tree-sitter-scala) - MIT License
- [scheme](https://github.com/6cdh/tree-sitter-scheme) - MIT License
- [scss](https://github.com/tree-sitter-grammars/tree-sitter-scss) - MIT License
- [slang](https://github.com/tree-sitter-grammars/tree-sitter-slang) - MIT License
- [smali](https://github.com/tree-sitter-grammars/tree-sitter-smali) - MIT License
- [smithy](https://github.com/indoorvivants/tree-sitter-smithy) - MIT License
- [solidity](https://github.com/JoranHonig/tree-sitter-solidity) - MIT License
- [sparql](https://github.com/GordianDziwis/tree-sitter-sparql) - MIT License
- [sql](https://github.com/derekstride/tree-sitter-sql) - MIT License
- [squirrel](https://github.com/tree-sitter-grammars/tree-sitter-squirrel) - MIT License
- [starlark](https://github.com/tree-sitter-grammars/tree-sitter-starlark) - MIT License
- [svelte](https://github.com/tree-sitter-grammars/tree-sitter-svelte) - MIT License
- [swift](https://github.com/alex-pinkus/tree-sitter-swift) - MIT License
- [tablegen](https://github.com/tree-sitter-grammars/tree-sitter-tablegen) - MIT License
- [tcl](https://github.com/tree-sitter-grammars/tree-sitter-tcl) - MIT License
- [test](https://github.com/tree-sitter-grammars/tree-sitter-test) - MIT License
- [thrift](https://github.com/tree-sitter-grammars/tree-sitter-thrift) - MIT License
- [toml](https://github.com/tree-sitter-grammars/tree-sitter-toml) - MIT License
- [tsv](https://github.com/amaanq/tree-sitter-csv) - MIT License
- [twig](https://github.com/gbprod/tree-sitter-twig) - WTFPL License
- [typescript](https://github.com/tree-sitter/tree-sitter-typescript) - MIT License
- [typst](https://github.com/uben0/tree-sitter-typst) - MIT License
- [udev](https://github.com/tree-sitter-grammars/tree-sitter-udev) - MIT License
- [ungrammar](https://github.com/tree-sitter-grammars/tree-sitter-ungrammar) - MIT License
- [uxntal](https://github.com/tree-sitter-grammars/tree-sitter-uxntal) - MIT License
- [v](https://github.com/nedpals/tree-sitter-v) - MIT License
- [verilog](https://github.com/tree-sitter/tree-sitter-verilog) - MIT License
- [vhdl](https://github.com/alemuller/tree-sitter-vhdl) - MIT License
- [vim](https://github.com/tree-sitter-grammars/tree-sitter-vim) - MIT License
- [vue](https://github.com/tree-sitter-grammars/tree-sitter-vue) - MIT License
- [wgsl](https://github.com/szebniok/tree-sitter-wgsl) - MIT License
- [xcompose](https://github.com/tree-sitter-grammars/tree-sitter-xcompose) - MIT License
- [xml](https://github.com/tree-sitter-grammars/tree-sitter-xml) - MIT License
- [yaml](https://github.com/tree-sitter-grammars/tree-sitter-yaml) - MIT License
- [yuck](https://github.com/tree-sitter-grammars/tree-sitter-yuck) - MIT License
- [zig](https://github.com/maxxnino/tree-sitter-zig) - MIT License

## Contribution

This library is open to contribution. Feel free to open issues or submit PRs. Its better to discuss issues before
submitting PRs to avoid disappointment.

### Local Development

1. Clone the repo
2. Install the system dependencies
3. Install the full dependencies with `uv sync --no-install-project`
4. Install the pre-commit hooks with:
   ```shell
   pre-commit install && pre-commit install --hook-type commit-msg
   ```
5. Clone the vendors with `uv run --no-sync scripts/clone_vendors.py`
6. Build the local extensions with `PROJECT_ROOT=. uv run setup.py build_ext --inplace`

### Running Tests

To run the tests, execute the following command:

```shell
PROJECT_ROOT=. uv run --no-sync pytest tests
```

### Adding a new language

#### Install

Some bindings are installed via UV and are added to the package dependencies in
the [pyproject.toml](./pyproject.toml) file.

To add an installed package follow these steps:

1. Install the bindings with `uv add <bindings_package_name> --no-install-project`.
2. Execute the cloning script with `uv run --no-sync scripts/clone_vendors.py`.
3. Update both the literal type `InstalledBindings` and the `installed_bindings_map` dictionary in the
   [\__init .py _](./tree_sitter_language_pack/__init__.py) file.
4. Update the code in the init file as necessary.
5. Build the bindings by executing: `uv run --no-sync setup.py build_ext --inplace`.
6. Execute the tests (see above).
7. If the tests pass, commit your changes and open a pull request.

#### Adding a Binary Wheel Language

1. Add the language to the [sources/language_definitions.json](sources/language_definitions.json) file
   at the repository's root. This file contains a mapping of language names to their respective repositories:
   ```jsonc
   {
     "name": {
       "repo": "https://github.com/...",
       "branch": "master", // not mandatory
       "directory": "sub-dir/something", // not mandatory
       "generate": true, // not mandatory
     },
   }
   ```
   - `repo` is the URL of the tree-sitter repository. This value is mandatory
   - `branch` the branch of the repository to checkout. You should specify this only when the branch is not called `main` (
     i.e. for `master` or other names, specify this).
   - `directory` is the directory under which there is an `src` folder. This should be specified only in cases where
     the `src` folder is not immediately under the root folder.
   - `generate` is a flag that dictates whether the `tree-sitter-cli` generate command should be executed in the given
     repository / directory combo. This should be specified only if the binding needs to be build in the repository.
2. Update the `SupportedLanguage` literal type in the [**init**.py](./tree_sitter_language_pack/__init__.py) file.
3. Install the dev dependencies with `uv sync --no-install-project -v`
4. Execute the cloning script with `uv run --no-sync scripts/clone_vendors.py`.
5. Build the bindings by executing: `PROJECT_ROOT=. uv run setup.py build_ext --inplace`.
6. Execute the tests (see above).
7. If the tests pass, commit your changes and open a pull request.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dom-tree-sitter-language-pack",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9.0",
    "maintainer_email": null,
    "keywords": "code, text-processing, tree-sitter",
    "author": null,
    "author_email": "Na'aman Hirschfeld <nhirschfeld@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/43/8f/3c18eed5c05a36440a38d3663f866b113867c1de6f3b4d986d3a211f2281/dom_tree_sitter_language_pack-0.4.0.tar.gz",
    "platform": null,
    "description": "# Tree Sitter Language Pack\n\nThis package bundles a comprehensive collection of [tree-sitter](https://tree-sitter.github.io/tree-sitter/) languages\nas both source distribution and pre-built wheels.\n\n## Installation\n\n```bash\npip install tree-sitter-language-pack\n```\n\n## Important Notes:\n\n- This package started life as a maintained and updated fork of\n  [tree-sitter-languages](https://github.com/grantjenks/py-tree-sitter-languages) by Grant Jenks, and it\n  incorporates code contributed by ObserverOfTime (see\n  this [PR](https://github.com/grantjenks/py-tree-sitter-languages/pull/65)).\n- This package is MIT licensed and the original package of which this is a fork has an Apache 2.0 License. Both licenses\n  are available in the LICENSE file.\n- All languages bundled by this package are licensed under permissive open-source licenses (MIT, Apache 2.0 etc.) only -\n  no GPL\n  licensed languages are included.\n- This library is compatible with [tree-sitter](https://tree-sitter.github.io/tree-sitter/) v0.22.0 and above.\n\n## Features\n\n- 100+ Languages: Support for all major programming languages and many domain-specific languages\n- Pre-built Wheels: Easy installation with no compilation required\n- Type-Safe: Full typing support for better IDE integration and code safety\n- Zero GPL Dependencies: All bundled languages use permissive licenses (MIT, Apache 2.0, etc.)\n\n## Usage\n\nThis library exposes two functions `get_language` and `get_parser`.\n\n```python\nfrom tree_sitter_language_pack import get_binding, get_language, get_parser\n\npython_binding = get_binding('python')  # this is an int pointing to the C binding\npython_lang = get_language('python')  # this is an instance of tree_sitter.Language\npython_parser = get_parser('python')  # this is an instance of tree_sitter.Parser\n```\n\nSee the list of available languages below to get the name of the language you want to use.\n\n## Available Languages:\n\nEach language below is identified by the key used to retrieve it from the `get_language` and `get_parser` functions.\n\n- [actionscript](https://github.com/Rileran/tree-sitter-actionscript) - MIT License\n- [ada](https://github.com/briot/tree-sitter-ada) - MIT License\n- [agda](https://github.com/tree-sitter/tree-sitter-agda) - MIT License\n- [arduino](https://github.com/tree-sitter-grammars/tree-sitter-arduino) - MIT License\n- [asm](https://github.com/rush-rs/tree-sitter-asm) - MIT License\n- [astro](https://github.com/virchau13/tree-sitter-astro) - MIT License\n- [bash](https://github.com/tree-sitter/tree-sitter-bash) - MIT License\n- [beancount](https://github.com/polarmutex/tree-sitter-beancount) - MIT License\n- [bibtex](https://github.com/latex-lsp/tree-sitter-bibtex) - MIT License\n- [bicep](https://github.com/tree-sitter-grammars/tree-sitter-bicep) - MIT License\n- [bitbake](https://github.com/tree-sitter-grammars/tree-sitter-bitbake) - MIT License\n- [c](https://github.com/tree-sitter/tree-sitter-c) - MIT License\n- [cairo](https://github.com/tree-sitter-grammars/tree-sitter-cairo) - MIT License\n- [capnp](https://github.com/tree-sitter-grammars/tree-sitter-capnp) - MIT License\n- [chatito](https://github.com/tree-sitter-grammars/tree-sitter-chatito) - MIT License\n- [clarity](https://github.com/xlittlerag/tree-sitter-clarity) - MIT License\n- [clojure](https://github.com/sogaiu/tree-sitter-clojure) - CC0 1.0 Universal License\n- [cmake](https://github.com/uyha/tree-sitter-cmake) - MIT License\n- [comment](https://github.com/stsewd/tree-sitter-comment) - MIT License\n- [commonlisp](https://github.com/tree-sitter-grammars/tree-sitter-commonlisp) - MIT License\n- [cpon](https://github.com/tree-sitter-grammars/tree-sitter-cpon) - MIT License\n- [cpp](https://github.com/tree-sitter/tree-sitter-cpp) - MIT License\n- [csharp](https://github.com/tree-sitter/tree-sitter-c-sharp) - MIT License\n- [css](https://github.com/tree-sitter/tree-sitter-css) - MIT License\n- [csv](https://github.com/tree-sitter-grammars/tree-sitter-csv) - MIT License\n- [cuda](https://github.com/tree-sitter-grammars/tree-sitter-cuda) - MIT License\n- [d](https://github.com/gdamore/tree-sitter-d) - MIT License\n- [dart](https://github.com/UserNobody14/tree-sitter-dart) - MIT License\n- [dockerfile](https://github.com/camdencheek/tree-sitter-dockerfile) - MIT License\n- [doxygen](https://github.com/tree-sitter-grammars/tree-sitter-doxygen) - MIT License\n- [elisp](https://github.com/Wilfred/tree-sitter-elisp) - MIT License\n- [elixir](https://github.com/elixir-lang/tree-sitter-elixir) - MIT License\n- [elm](https://github.com/elm-tooling/tree-sitter-elm) - MIT License\n- [embeddedtemplate](https://github.com/tree-sitter/tree-sitter-embedded-template) - MIT License\n- [erlang](https://github.com/WhatsApp/tree-sitter-erlang) - MIT License\n- [fennel](https://github.com/TravonteD/tree-sitter-fennel) - MIT License\n- [firrtl](https://github.com/tree-sitter-grammars/tree-sitter-firrtl) - Apache License 2.0\n- [fish](https://github.com/ram02z/tree-sitter-fish) - Unlicense license\n- [fortran](https://github.com/stadelmanma/tree-sitter-fortran) - MIT License\n- [func](https://github.com/tree-sitter-grammars/tree-sitter-func) - MIT License\n- [gdscript](https://github.com/PrestonKnopp/tree-sitter-gdscript) - MIT License\n- [gitattributes](https://github.com/tree-sitter-grammars/tree-sitter-gitattributes) - MIT License\n- [gitcommit](https://github.com/gbprod/tree-sitter-gitcommit) - WTFPL License\n- [gitignore](https://github.com/shunsambongi/tree-sitter-gitignore) - MIT License\n- [gleam](https://github.com/gleam-lang/tree-sitter-gleam) - Apache-2.0 license\n- [glsl](https://github.com/tree-sitter-grammars/tree-sitter-glsl) - MIT License\n- [gn](https://github.com/tree-sitter-grammars/tree-sitter-gn) - MIT License\n- [go](https://github.com/tree-sitter/tree-sitter-go) - MIT License\n- [gomod](https://github.com/camdencheek/tree-sitter-go-mod) - MIT License\n- [gosum](https://github.com/tree-sitter-grammars/tree-sitter-go-sum) - MIT License\n- [groovy](https://github.com/Decodetalkers/tree-sitter-groovy) - MIT License\n- [gstlaunch](https://github.com/tree-sitter-grammars/tree-sitter-gstlaunch) - MIT License\n- [hack](https://github.com/slackhq/tree-sitter-hack) - MIT License\n- [hare](https://github.com/tree-sitter-grammars/tree-sitter-hare) - MIT License\n- [haskell](https://github.com/tree-sitter/tree-sitter-haskell) - MIT License\n- [haxe](https://github.com/vantreeseba/tree-sitter-haxe) - MIT License\n- [hcl](https://github.com/tree-sitter-grammars/tree-sitter-hcl) - Apache License 2.0\n- [heex](https://github.com/phoenixframework/tree-sitter-heex) - MIT License\n- [hlsl](https://github.com/tree-sitter-grammars/tree-sitter-hlsl) - MIT License\n- [html](https://github.com/tree-sitter/tree-sitter-html) - MIT License\n- [hyprlang](https://github.com/tree-sitter-grammars/tree-sitter-hyprlang) MIT License\n- [ispc](https://github.com/tree-sitter-grammars/tree-sitter-ispc) - MIT License\n- [janet](https://github.com/GrayJack/tree-sitter-janet) - BSD-3-Clause license\n- [java](https://github.com/tree-sitter/tree-sitter-java) - MIT License\n- [javascript](https://github.com/tree-sitter/tree-sitter-javascript) - MIT License\n- [jsdoc](https://github.com/tree-sitter/tree-sitter-jsdoc) - MIT License\n- [json](https://github.com/tree-sitter/tree-sitter-json) - MIT License\n- [jsonnet](https://github.com/sourcegraph/tree-sitter-jsonnet) - MIT License\n- [julia](https://github.com/tree-sitter/tree-sitter-julia) - MIT License\n- [kconfig](https://github.com/tree-sitter-grammars/tree-sitter-kconfig) - MIT License\n- [kdl](https://github.com/tree-sitter-grammars/tree-sitter-kdl) - MIT License\n- [kotlin](https://github.com/fwcd/tree-sitter-kotlin) - MIT License\n- [linkerscript](https://github.com/tree-sitter-grammars/tree-sitter-linkerscript) - MIT License\n- [llvm](https://github.com/benwilliamgraham/tree-sitter-llvm) - MIT License\n- [lua](https://github.com/tree-sitter-grammars/tree-sitter-lua) - MIT License\n- [luadoc](https://github.com/tree-sitter-grammars/tree-sitter-luadoc) - MIT License\n- [luap](https://github.com/tree-sitter-grammars/tree-sitter-luap) - MIT License\n- [luau](https://github.com/tree-sitter-grammars/tree-sitter-luau) - MIT License\n- [magik](https://github.com/krn-robin/tree-sitter-magik) - MIT License\n- [make](https://github.com/tree-sitter-grammars/tree-sitter-make) - MIT License\n- [markdown](https://github.com/tree-sitter-grammars/tree-sitter-markdown) - MIT License\n- [matlab](https://github.com/acristoffers/tree-sitter-matlab) - MIT License\n- [mermaid](https://github.com/monaqa/tree-sitter-mermaid) - MIT License\n- [meson](https://github.com/tree-sitter-grammars/tree-sitter-meson) - MIT License\n- [ninja](https://github.com/alemuller/tree-sitter-ninja) - MIT License\n- [nix](https://github.com/nix-community/tree-sitter-nix) - MIT License\n- [nqc](https://github.com/tree-sitter-grammars/tree-sitter-nqc) - MIT License\n- [objc](https://github.com/tree-sitter-grammars/tree-sitter-objc) - MIT License\n- [odin](https://github.com/tree-sitter-grammars/tree-sitter-odin) - MIT License\n- [org](https://github.com/milisims/tree-sitter-org) - MIT License\n- [pascal](https://github.com/Isopod/tree-sitter-pascal) - MIT License\n- [pem](https://github.com/tree-sitter-grammars/tree-sitter-pem) - MIT License\n- [perl](https://github.com/tree-sitter-perl/tree-sitter-perl) - Artistic License 2.0\n- [pgn](https://github.com/rolandwalker/tree-sitter-pgn) - BSD-2-Clause license\n- [php](https://github.com/tree-sitter/tree-sitter-php) - MIT License\n- [po](https://github.com/tree-sitter-grammars/tree-sitter-po) - MIT License\n- [pony](https://github.com/tree-sitter-grammars/tree-sitter-pony) - MIT License\n- [powershell](https://github.com/airbus-cert/tree-sitter-powershell) - MIT License\n- [printf](https://github.com/tree-sitter-grammars/tree-sitter-printf) - ISC License\n- [prisma](https://github.com/LumaKernel/tree-sitter-prisma) - MIT License\n- [properties](https://github.com/tree-sitter-grammars/tree-sitter-properties) - MIT License\n- [proto](https://github.com/coder3101/tree-sitter-proto) - MIT License\n- [psv](https://github.com/amaanq/tree-sitter-csv) - MIT License\n- [puppet](https://github.com/tree-sitter-grammars/tree-sitter-puppet) - MIT License\n- [purescript](https://github.com/postsolar/tree-sitter-purescript) - MIT License\n- [pymanifest](https://github.com/tree-sitter-grammars/tree-sitter-pymanifest) - MIT License\n- [python](https://github.com/tree-sitter/tree-sitter-python) - MIT License\n- [qmldir](https://github.com/tree-sitter-grammars/tree-sitter-qmldir) - MIT License\n- [query](https://github.com/tree-sitter-grammars/tree-sitter-query) - Apache License 2.0\n- [r](https://github.com/r-lib/tree-sitter-r) - MIT License\n- [racket](https://github.com/6cdh/tree-sitter-racket) - MIT License\n- [rbs](https://github.com/joker1007/tree-sitter-rbs) - MIT License\n- [re2c](https://github.com/tree-sitter-grammars/tree-sitter-re2c) - MIT License\n- [readline](https://github.com/tree-sitter-grammars/tree-sitter-readline) - MIT License\n- [requirements](https://github.com/tree-sitter-grammars/tree-sitter-requirements) - MIT License\n- [ron](https://github.com/tree-sitter-grammars/tree-sitter-ron) - Apache License 2.0\n- [rst](https://github.com/stsewd/tree-sitter-rst) - MIT License\n- [ruby](https://github.com/tree-sitter/tree-sitter-ruby) - MIT License\n- [rust](https://github.com/tree-sitter/tree-sitter-rust) - MIT License\n- [scala](https://github.com/tree-sitter/tree-sitter-scala) - MIT License\n- [scheme](https://github.com/6cdh/tree-sitter-scheme) - MIT License\n- [scss](https://github.com/tree-sitter-grammars/tree-sitter-scss) - MIT License\n- [slang](https://github.com/tree-sitter-grammars/tree-sitter-slang) - MIT License\n- [smali](https://github.com/tree-sitter-grammars/tree-sitter-smali) - MIT License\n- [smithy](https://github.com/indoorvivants/tree-sitter-smithy) - MIT License\n- [solidity](https://github.com/JoranHonig/tree-sitter-solidity) - MIT License\n- [sparql](https://github.com/GordianDziwis/tree-sitter-sparql) - MIT License\n- [sql](https://github.com/derekstride/tree-sitter-sql) - MIT License\n- [squirrel](https://github.com/tree-sitter-grammars/tree-sitter-squirrel) - MIT License\n- [starlark](https://github.com/tree-sitter-grammars/tree-sitter-starlark) - MIT License\n- [svelte](https://github.com/tree-sitter-grammars/tree-sitter-svelte) - MIT License\n- [swift](https://github.com/alex-pinkus/tree-sitter-swift) - MIT License\n- [tablegen](https://github.com/tree-sitter-grammars/tree-sitter-tablegen) - MIT License\n- [tcl](https://github.com/tree-sitter-grammars/tree-sitter-tcl) - MIT License\n- [test](https://github.com/tree-sitter-grammars/tree-sitter-test) - MIT License\n- [thrift](https://github.com/tree-sitter-grammars/tree-sitter-thrift) - MIT License\n- [toml](https://github.com/tree-sitter-grammars/tree-sitter-toml) - MIT License\n- [tsv](https://github.com/amaanq/tree-sitter-csv) - MIT License\n- [twig](https://github.com/gbprod/tree-sitter-twig) - WTFPL License\n- [typescript](https://github.com/tree-sitter/tree-sitter-typescript) - MIT License\n- [typst](https://github.com/uben0/tree-sitter-typst) - MIT License\n- [udev](https://github.com/tree-sitter-grammars/tree-sitter-udev) - MIT License\n- [ungrammar](https://github.com/tree-sitter-grammars/tree-sitter-ungrammar) - MIT License\n- [uxntal](https://github.com/tree-sitter-grammars/tree-sitter-uxntal) - MIT License\n- [v](https://github.com/nedpals/tree-sitter-v) - MIT License\n- [verilog](https://github.com/tree-sitter/tree-sitter-verilog) - MIT License\n- [vhdl](https://github.com/alemuller/tree-sitter-vhdl) - MIT License\n- [vim](https://github.com/tree-sitter-grammars/tree-sitter-vim) - MIT License\n- [vue](https://github.com/tree-sitter-grammars/tree-sitter-vue) - MIT License\n- [wgsl](https://github.com/szebniok/tree-sitter-wgsl) - MIT License\n- [xcompose](https://github.com/tree-sitter-grammars/tree-sitter-xcompose) - MIT License\n- [xml](https://github.com/tree-sitter-grammars/tree-sitter-xml) - MIT License\n- [yaml](https://github.com/tree-sitter-grammars/tree-sitter-yaml) - MIT License\n- [yuck](https://github.com/tree-sitter-grammars/tree-sitter-yuck) - MIT License\n- [zig](https://github.com/maxxnino/tree-sitter-zig) - MIT License\n\n## Contribution\n\nThis library is open to contribution. Feel free to open issues or submit PRs. Its better to discuss issues before\nsubmitting PRs to avoid disappointment.\n\n### Local Development\n\n1. Clone the repo\n2. Install the system dependencies\n3. Install the full dependencies with `uv sync --no-install-project`\n4. Install the pre-commit hooks with:\n   ```shell\n   pre-commit install && pre-commit install --hook-type commit-msg\n   ```\n5. Clone the vendors with `uv run --no-sync scripts/clone_vendors.py`\n6. Build the local extensions with `PROJECT_ROOT=. uv run setup.py build_ext --inplace`\n\n### Running Tests\n\nTo run the tests, execute the following command:\n\n```shell\nPROJECT_ROOT=. uv run --no-sync pytest tests\n```\n\n### Adding a new language\n\n#### Install\n\nSome bindings are installed via UV and are added to the package dependencies in\nthe [pyproject.toml](./pyproject.toml) file.\n\nTo add an installed package follow these steps:\n\n1. Install the bindings with `uv add <bindings_package_name> --no-install-project`.\n2. Execute the cloning script with `uv run --no-sync scripts/clone_vendors.py`.\n3. Update both the literal type `InstalledBindings` and the `installed_bindings_map` dictionary in the\n   [\\__init .py _](./tree_sitter_language_pack/__init__.py) file.\n4. Update the code in the init file as necessary.\n5. Build the bindings by executing: `uv run --no-sync setup.py build_ext --inplace`.\n6. Execute the tests (see above).\n7. If the tests pass, commit your changes and open a pull request.\n\n#### Adding a Binary Wheel Language\n\n1. Add the language to the [sources/language_definitions.json](sources/language_definitions.json) file\n   at the repository's root. This file contains a mapping of language names to their respective repositories:\n   ```jsonc\n   {\n     \"name\": {\n       \"repo\": \"https://github.com/...\",\n       \"branch\": \"master\", // not mandatory\n       \"directory\": \"sub-dir/something\", // not mandatory\n       \"generate\": true, // not mandatory\n     },\n   }\n   ```\n   - `repo` is the URL of the tree-sitter repository. This value is mandatory\n   - `branch` the branch of the repository to checkout. You should specify this only when the branch is not called `main` (\n     i.e. for `master` or other names, specify this).\n   - `directory` is the directory under which there is an `src` folder. This should be specified only in cases where\n     the `src` folder is not immediately under the root folder.\n   - `generate` is a flag that dictates whether the `tree-sitter-cli` generate command should be executed in the given\n     repository / directory combo. This should be specified only if the binding needs to be build in the repository.\n2. Update the `SupportedLanguage` literal type in the [**init**.py](./tree_sitter_language_pack/__init__.py) file.\n3. Install the dev dependencies with `uv sync --no-install-project -v`\n4. Execute the cloning script with `uv run --no-sync scripts/clone_vendors.py`.\n5. Build the bindings by executing: `PROJECT_ROOT=. uv run setup.py build_ext --inplace`.\n6. Execute the tests (see above).\n7. If the tests pass, commit your changes and open a pull request.\n",
    "bugtrack_url": null,
    "license": "Copyright 2024-2025 Na'aman Hirschfeld\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n        \n        Copyright 2022 Grant Jenks\n        \n        Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\n        this file except in compliance with the License. You may obtain a copy of the\n        License at\n        \n            http://www.apache.org/licenses/LICENSE-2.0\n        \n        Unless required by applicable law or agreed to in writing, software distributed\n        under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n        CONDITIONS OF ANY KIND, either express or implied. See the License for the\n        specific language governing permissions and limitations under the License.\n        ",
    "summary": "Extensive Language Pack for Tree-Sitter",
    "version": "0.4.0",
    "project_urls": {
        "homepage": "https://github.com/Goldziher/tree-sitter-language-pack"
    },
    "split_keywords": [
        "code",
        " text-processing",
        " tree-sitter"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6501597a3d553c2071d90e4ceeb76bf4fce0f54e6f6c35ccbe82be2afcbdaffb",
                "md5": "f853b4e11143f6db0615dda1f81cf76f",
                "sha256": "36e0bd4bd4d51ece5877a26f64b181dae6e319c4085a558a81b94d70afa9d81e"
            },
            "downloads": -1,
            "filename": "dom_tree_sitter_language_pack-0.4.0-cp39-abi3-macosx_14_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "f853b4e11143f6db0615dda1f81cf76f",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9.0",
            "size": 4762374,
            "upload_time": "2025-02-15T08:15:19",
            "upload_time_iso_8601": "2025-02-15T08:15:19.489992Z",
            "url": "https://files.pythonhosted.org/packages/65/01/597a3d553c2071d90e4ceeb76bf4fce0f54e6f6c35ccbe82be2afcbdaffb/dom_tree_sitter_language_pack-0.4.0-cp39-abi3-macosx_14_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "438f3c18eed5c05a36440a38d3663f866b113867c1de6f3b4d986d3a211f2281",
                "md5": "cfcc25774b759a7f86be630b4184bf71",
                "sha256": "99df898a5a1062f72d8f6d3b413b32ec296eebed0fa2b31848f0006dab010b2a"
            },
            "downloads": -1,
            "filename": "dom_tree_sitter_language_pack-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "cfcc25774b759a7f86be630b4184bf71",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.0",
            "size": 17318110,
            "upload_time": "2025-02-15T08:15:55",
            "upload_time_iso_8601": "2025-02-15T08:15:55.522852Z",
            "url": "https://files.pythonhosted.org/packages/43/8f/3c18eed5c05a36440a38d3663f866b113867c1de6f3b4d986d3a211f2281/dom_tree_sitter_language_pack-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-15 08:15:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Goldziher",
    "github_project": "tree-sitter-language-pack",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dom-tree-sitter-language-pack"
}
        
Elapsed time: 0.41829s