Skip to main content
Pre-release

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

Building from this branch requires Python 3.11 or newer. The published 0.4.0a1 release still supports Python 3.10.

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.2"
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.2 adds named and inline spawn targets, including typed inline targets and optional let bindings. See the spawn syntax notes. Execution and handle semantics require matching Toolang runtime support.

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.0a2 or npm install tree-sitter-toolang@0.4.0-alpha.2.

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.md
  • grammar.js
  • queries/*.scm
  • test/corpus/*.txt
  • tests/fixtures/*.too
  • tests/*.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.

Python wheels use the cp311-abi3 tag for compatibility with Python 3.11 and later. Both wheel and release workflows build Linux x86_64 and ARM64 wheels on separate native runners, covering manylinux and musllinux. macOS universal2 and Windows AMD64 builds are also retained. Every wheel build runs the full Python test suite.

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:

  1. Bump the version in package.json, package-lock.json, pyproject.toml, Cargo.toml, Cargo.lock, and tree-sitter.json.
  2. Confirm CI is green.
  3. Merge the version bump PR into main.
  4. Create and push a matching tag such as v0.4.0-alpha.1.
  5. GitHub Actions publishes npm and PyPI automatically.
  6. GitHub Actions also publishes the Rust crate when CRATES_IO_TOKEN is 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.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tree-sitter-toolang 0.4.0a2
File Size Uploaded
tree_sitter_toolang-0.4.0a2.tar.gz 120.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tree-sitter-toolang 0.4.0a2
File
tree_sitter_toolang-0.4.0a2-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
tree_sitter_toolang-0.4.0a2-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details
tree_sitter_toolang-0.4.0a2-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details
tree_sitter_toolang-0.4.0a2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64, Linux glibc 2.17+ ARM64 Details
tree_sitter_toolang-0.4.0a2-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.11 abi3 Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 Details
tree_sitter_toolang-0.4.0a2-cp311-abi3-macosx_10_9_universal2.whl CPython 3.11 abi3 macOS 10.9+ universal2 (ARM64, x86-64) Details

Total release size: 567.2 kB

Release files / tree_sitter_toolang-0.4.0a2.tar.gz

Download URL tree_sitter_toolang-0.4.0a2.tar.gz
Size 120.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5daddda5700a08c587a72b74121ac60aec85cd00dc54b7d009f4d95380afddeb
BLAKE2b-256 checksum
How to use checksums
dfe280a11b1fe945ed47c78bfb1743b734908bdb6dbf6376c87dd1871e12d78a
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

Release files / tree_sitter_toolang-0.4.0a2-cp311-abi3-win_amd64.whl

Download URL tree_sitter_toolang-0.4.0a2-cp311-abi3-win_amd64.whl
Size 53.5 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ead0c12d196f9be891be8dc0f7b5c631c7a2ff4754e3f8fa70822d2e7b0e2278
BLAKE2b-256 checksum
How to use checksums
86863ca7a855d3e3386dfc938bfd773abababe8bad426d6f900d762ed9b69df9
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

Release files / tree_sitter_toolang-0.4.0a2-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL tree_sitter_toolang-0.4.0a2-cp311-abi3-musllinux_1_2_x86_64.whl
Size 74.6 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
5415ca8e7d6aca4a73373eea832b3a922279f39307a2d719561008b448306cc0
BLAKE2b-256 checksum
How to use checksums
c81d3945e44ae3d340e50c2714e32b58962ff12108484153ed1dc18885fa943c
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

Release files / tree_sitter_toolang-0.4.0a2-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL tree_sitter_toolang-0.4.0a2-cp311-abi3-musllinux_1_2_aarch64.whl
Size 74.6 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
6fa0234860ad0d5ec3d5aaf3580cb8b46f65319c65a989e905e527e4392b742c
BLAKE2b-256 checksum
How to use checksums
e0d17c2225afab5968561259db6693b5b4829ce8f5548ff90f2d0543a30d9a5d
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

Release files / tree_sitter_toolang-0.4.0a2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL tree_sitter_toolang-0.4.0a2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 75.9 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
7e3118e08f57cc3e24405f469df9024385c70b0dc02ebc710fc7a1eee78ddbc2
BLAKE2b-256 checksum
How to use checksums
8680d5c2a33c5e19297ca6e2151ad94f84e4d5ac1107a8ec3a5bc733d04faf9c
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

Release files / tree_sitter_toolang-0.4.0a2-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL tree_sitter_toolang-0.4.0a2-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 74.9 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 abi3
SHA-256 checksum
How to use checksums
faa0cae26852319e23166e88c619d3f7e1230a79873a67be167af59a67cf87a2
BLAKE2b-256 checksum
How to use checksums
3b166c5406317022943acd900ccd228956007e8a62d3a2e4c762d89260c84149
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

Release files / tree_sitter_toolang-0.4.0a2-cp311-abi3-macosx_10_9_universal2.whl

Download URL tree_sitter_toolang-0.4.0a2-cp311-abi3-macosx_10_9_universal2.whl
Size 93.0 kB
Tags CPython 3.11 abi3 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
93bb6d0b9f1d6064f94588ed625f894b3108d9cf5a708f66141f4e75252d1952
BLAKE2b-256 checksum
How to use checksums
cc942e623877fba7a79f6697b14499885baf8fee823f295a42f531d1fda14bc8
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
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page