This release is a pre-release and may not be stable for production use.
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.4.0-alpha.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/.
Version 0.4.0-alpha.1 uses run in place of scatter/gather, renames
storm/settle to generate/reduce, and requires using only for named
collection targets. See the migration notes.
These forms require a matching Toolang runtime release.
Install this prerelease explicitly with
python -m pip install tree-sitter-toolang==0.4.0a1 or
npm install tree-sitter-toolang@0.4.0-alpha.1.
Version 0.3.4 adds named and inline exec statements in flows and repeats.
See the Flow reference
for syntax and CST fields.
Version 0.3.3 shares configuration directives between agics and flows, removes
the count from scatter, adds optional from: initializers to settle, and
adds windowing N to repeat. See the
0.3.3 migration notes.
Documentation comments use #@ for modules and ## for items, including
## @param NAME DESCRIPTION. The legacy ##! module marker remains accepted.
See comments and documentation
for syntax, CST fields, and the 0.3.2 node-name migration.
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
.venv/bin/python -m unittest discover -s scripts -p 'test_*.py'
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.
- Merge the version bump PR into
main. - Create and push a matching tag such as
v0.4.0-alpha.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.
Prereleases use X.Y.Z-alpha.N, X.Y.Z-beta.N, or X.Y.Z-rc.N consistently
in source metadata and tags. Python packaging normalizes these to X.Y.ZaN,
X.Y.ZbN, or X.Y.ZrcN; for example, 0.4.0-alpha.1 is published on PyPI as
0.4.0a1. npm prereleases use the next dist-tag; stable releases use latest.
Metadata
Release files for tree-sitter-toolang 0.4.0a1
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.4.0a1.tar.gz | 116.7 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| tree_sitter_toolang-0.4.0a1-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| tree_sitter_toolang-0.4.0a1-cp310-abi3-musllinux_1_2_x86_64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ x86-64 | Details |
| tree_sitter_toolang-0.4.0a1-cp310-abi3-musllinux_1_2_aarch64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ ARM64 | Details |
| tree_sitter_toolang-0.4.0a1-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.4.0a1-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| tree_sitter_toolang-0.4.0a1-cp310-abi3-macosx_10_9_universal2.whl | CPython 3.10 | abi3 | macOS 10.9+ universal2 (ARM64, x86-64) | Details |
Total release size: 555.8 kB
Release files / tree_sitter_toolang-0.4.0a1.tar.gz
| Download URL | tree_sitter_toolang-0.4.0a1.tar.gz |
|---|---|
| Size | 116.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
67f1b6907852e4cb68c92aafff2be69c1a673e9920432897f832d15d4e8bd6d0
|
|
BLAKE2b-256 checksum How to use checksums |
307b434297d0af3853f063fbf09a17919f7bdfcb3f2d46dc3ebabc6c48384142
|
| 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 Oct 5, 2026.
Transparency logRelease files / tree_sitter_toolang-0.4.0a1-cp310-abi3-win_amd64.whl
| Download URL | tree_sitter_toolang-0.4.0a1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 52.4 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
bf9d65c775e1fa5c65f6aa00426f9308b33d152db5a600653751500a0b985def
|
|
BLAKE2b-256 checksum How to use checksums |
3c2c41da041919d5ffbbe85dcd2c5c5e5974c3d7618f690ff2a86fcd4044da8d
|
| 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 Oct 5, 2026.
Transparency logRelease files / tree_sitter_toolang-0.4.0a1-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | tree_sitter_toolang-0.4.0a1-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 73.5 kB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4326e046e85da0531b2561b4e6221dd120e8eff99518546b085e5b958eb6fdb9
|
|
BLAKE2b-256 checksum How to use checksums |
efe8133f91648838aa3c5fd98ce7312a26d7b4a9f776135384de7f0463c28eb6
|
| 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 Oct 5, 2026.
Transparency logRelease files / tree_sitter_toolang-0.4.0a1-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | tree_sitter_toolang-0.4.0a1-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 73.4 kB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
bddd3410467a407f49f8fced505deeba152f330218785fde440789d15a5fda4f
|
|
BLAKE2b-256 checksum How to use checksums |
e233294b02572a4a16ba69c19935ec33888d59b25c5168447daf9e95a6aa2547
|
| 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 Oct 5, 2026.
Transparency logRelease files / tree_sitter_toolang-0.4.0a1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | tree_sitter_toolang-0.4.0a1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 74.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
c7c46179b9f9c4afd427f8f6da4de9e2aec7a3ab5d86d74181cff5302c985038
|
|
BLAKE2b-256 checksum How to use checksums |
1eed3ec44483809e86a3403c73d981675e198e135cc5fb68785f9c0733d55c24
|
| 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 Oct 5, 2026.
Transparency logRelease files / tree_sitter_toolang-0.4.0a1-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | tree_sitter_toolang-0.4.0a1-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 73.8 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 |
0c5c412c7306e8ee1561ecf403b364c3408e61adeab22bc082d93203da3e8923
|
|
BLAKE2b-256 checksum How to use checksums |
b1bc5961da054e8fc4aa00d7f30ae3c6af33d5bc915b64cab93bb8e8b1aaa97f
|
| 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 Oct 5, 2026.
Transparency logRelease files / tree_sitter_toolang-0.4.0a1-cp310-abi3-macosx_10_9_universal2.whl
| Download URL | tree_sitter_toolang-0.4.0a1-cp310-abi3-macosx_10_9_universal2.whl |
|---|---|
| Size | 91.3 kB |
| Tags | CPython 3.10 abi3 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
65ab1a0b3e897298b30953dad7ca65de815dfc49d524b6d2e9744ecbdc8c5953
|
|
BLAKE2b-256 checksum How to use checksums |
c20bc8ed319ce979658d98d00290e95b5fb3e6af00bb4694ece7a1db63b23033
|
| 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 Oct 5, 2026.
Transparency log