tree-sitter-toolang
Tree-sitter grammar for Toolang.
This repository publishes:
- the npm grammar package
tree-sitter-toolang - the Python extension package
tree-sitter-toolang - the Rust crate
tree-sitter-toolang
Install
Python
python -m pip install tree-sitter-toolang tree-sitter
import tree_sitter_toolang
from tree_sitter import Language, Parser
language = Language(tree_sitter_toolang.language())
parser = Parser(language)
tree = parser.parse(b"with skill a/b\n")
The Python package also exposes packaged query strings:
HIGHLIGHTS_QUERY, INJECTIONS_QUERY, INDENTS_QUERY, OUTLINE_QUERY, and
TAGS_QUERY.
Tree-sitter CLI
Install tree-sitter-toolang or clone this repository, then make sure the
directory that contains tree-sitter-toolang is listed in your Tree-sitter
parser-directories.
tree-sitter init-config
tree-sitter dump-languages
tree-sitter parse path/to/file.too
tree-sitter highlight path/to/file.too
tree-sitter tags path/to/file.too
Installing the npm package alone does not make tree-sitter dump-languages
discover Toolang automatically. The package must still live under one of the
configured parser-directories, or the grammar path must be provided
explicitly.
Rust
[dependencies]
tree-sitter = "0.25"
tree-sitter-toolang = "0.3.1"
let language = tree_sitter::Language::new(tree_sitter_toolang::LANGUAGE);
Grammar
GRAMMAR.md documents the public Toolang syntax and CST contract.
grammar.js is the parser source of truth; generated artifacts live under
src/.
Development
Edit:
GRAMMAR.mdgrammar.jsqueries/*.scmtest/corpus/*.txttests/fixtures/*.tootests/*.py
Regenerate and test:
npm ci
python -m venv .venv
.venv/bin/python -m pip install -e '.[tests]'
npm run check
.venv/bin/python -m pytest tests
cargo test
Publishing
Trusted publishers are configured in GitHub Actions with release.yml.
To publish the Rust crate automatically, add the repository secret
CRATES_IO_TOKEN.
Verify the npm package locally:
npm publish --dry-run
Verify the Python distributions locally:
python -m pip install --upgrade pip build twine
python -m build
python -m twine check dist/*
Verify the Rust crate:
cargo publish --dry-run
Release checklist:
- Bump the version in
package.json,package-lock.json,pyproject.toml,Cargo.toml,Cargo.lock, andtree-sitter.json. - Confirm CI is green.
- Push the version commit to
main. - Create and push a matching tag such as
v0.3.1. - GitHub Actions publishes npm and PyPI automatically.
- GitHub Actions also publishes the Rust crate when
CRATES_IO_TOKENis set.
The release workflow skips npm, PyPI, or crates.io if that version already exists on the registry. The git tag must match the package version.
Metadata
Release files for tree-sitter-toolang 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tree_sitter_toolang-0.3.1.tar.gz | 90.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| tree_sitter_toolang-0.3.1-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| tree_sitter_toolang-0.3.1-cp310-abi3-musllinux_1_2_x86_64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ x86-64 | Details |
| tree_sitter_toolang-0.3.1-cp310-abi3-musllinux_1_2_aarch64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ ARM64 | Details |
| tree_sitter_toolang-0.3.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ ARM64, Linux glibc 2.17+ ARM64 | Details |
| tree_sitter_toolang-0.3.1-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 | Details |
| tree_sitter_toolang-0.3.1-cp310-abi3-macosx_10_9_universal2.whl | CPython 3.10 | abi3 | macOS 10.9+ universal2 (ARM64, x86-64) | Details |
Total release size: 437.0 kB
Release files / tree_sitter_toolang-0.3.1.tar.gz
| Download URL | tree_sitter_toolang-0.3.1.tar.gz |
|---|---|
| Size | 90.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e35bf7057e66d1681ba106e5b698e9c11f3c6fb046f9b87be4cb0cc44d827194
|
|
BLAKE2b-256 checksum How to use checksums |
e3c772634326d9f8cf34b4546eff09fceca0a95df3f2a1689c3c26cb531b3a52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / tree_sitter_toolang-0.3.1-cp310-abi3-win_amd64.whl
| Download URL | tree_sitter_toolang-0.3.1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 41.4 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
22ca3345d87864dd588a7a1e400036cff77598e3ce3e415640b9e0f940826f4d
|
|
BLAKE2b-256 checksum How to use checksums |
e496f932c04a8ada3f52b9f4b4db5bc68c0b7eeceae8bd2f33004f5d19122bf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / tree_sitter_toolang-0.3.1-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | tree_sitter_toolang-0.3.1-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 58.9 kB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e344d98cc9b704173c539530550fa31c187da213c431d3d88665a28c135f9ba0
|
|
BLAKE2b-256 checksum How to use checksums |
6de012fc8e8efc51b4cbe0a1dbe591c83a52ffe53b40843ec0ae920cfcba6613
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / tree_sitter_toolang-0.3.1-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | tree_sitter_toolang-0.3.1-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 58.5 kB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
fb72c545794bdd638fe802007b11e255a4a4aca64ab398860cdd417ad273e46f
|
|
BLAKE2b-256 checksum How to use checksums |
1dc39a22404372370e8f69a4609a56c3edf57470bdf653f82a307f9c1b829be5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / tree_sitter_toolang-0.3.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | tree_sitter_toolang-0.3.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 59.1 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
ebbfe9206fcf73ff4cbc9bd7521fca4c9f0c6853161c01dc18319b69be67d10e
|
|
BLAKE2b-256 checksum How to use checksums |
3d639989584295855bf40c120e3fd99e56bdb5865896ca7308e06c9efcc8b99e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / tree_sitter_toolang-0.3.1-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | tree_sitter_toolang-0.3.1-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 58.9 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e043a626fd35b643900aa62be0776a083e871bd5ae33fb9cf78e09521e6744d8
|
|
BLAKE2b-256 checksum How to use checksums |
62f002e96e58e1efd446cc7ec90663eee5eac9b13cb510f505c16105bd4f3300
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / tree_sitter_toolang-0.3.1-cp310-abi3-macosx_10_9_universal2.whl
| Download URL | tree_sitter_toolang-0.3.1-cp310-abi3-macosx_10_9_universal2.whl |
|---|---|
| Size | 70.0 kB |
| Tags | CPython 3.10 abi3 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
3a21519d0a8b95a6bab66d1be1ad6b7de2c9ca85ab57edd0923c5ed89e574591
|
|
BLAKE2b-256 checksum How to use checksums |
602e3daf6bdac59a0111c6f9a72655102c6de5154df84342c41013c9021e5d9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency log