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.3"
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.3 allows an optional until at any position in a repeat, including a named runnable condition. It changes the repeat CST and rejects keyword-named variables. See the migration notes; Toolang consumers need the matching CST update.

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

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.0a3

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.0a3
File Size Uploaded
tree_sitter_toolang-0.4.0a3.tar.gz 116.0 kB Details

Built distributions (wheels)

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

Total release size: 544.1 kB

Release files / tree_sitter_toolang-0.4.0a3.tar.gz

Download URL tree_sitter_toolang-0.4.0a3.tar.gz
Size 116.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dd43f8caff0be5978db522f53715ed3d627a5404734610ee75eaf5c9bdfec391
BLAKE2b-256 checksum
How to use checksums
4cdb6bd73845e3d6a66bd45c54b91ebedc8b2a95c33938ba00a3200308438746
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 6, 2026.

Transparency log

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

Download URL tree_sitter_toolang-0.4.0a3-cp311-abi3-win_amd64.whl
Size 50.1 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
daad9bdae9b304b15c3fa5e60ddf5d5f3669aad3b4970c6f3277663d8ab107e4
BLAKE2b-256 checksum
How to use checksums
425c3c74e07c219deca1c588a6ee920aea44ddbabcabadce86aa1ade5b75ba5a
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 6, 2026.

Transparency log

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

Download URL tree_sitter_toolang-0.4.0a3-cp311-abi3-musllinux_1_2_x86_64.whl
Size 72.6 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
9529662ac785894c9579096ddc0fa5150eb3f60bb6ac042786504858eb4c2377
BLAKE2b-256 checksum
How to use checksums
f300338338193a59a9537319ed4cc18a1b42586e4e4e92cfc686b5752a59747b
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 6, 2026.

Transparency log

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

Download URL tree_sitter_toolang-0.4.0a3-cp311-abi3-musllinux_1_2_aarch64.whl
Size 72.5 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
cb8b2513152876d7551d344d4f121d677b9256b065b2f8541d987d57be937ddb
BLAKE2b-256 checksum
How to use checksums
d711245012e3e89e460a65dbdb8d63e18e93f15f9e0812b72e994048ad65a93c
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 6, 2026.

Transparency log

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

Download URL tree_sitter_toolang-0.4.0a3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 73.7 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
a0f492492726a5ba9b55ef6e0df0fda4f54eb6a10ab94ea780fdc724200d6ffe
BLAKE2b-256 checksum
How to use checksums
8772fb9ae28a82a85a85a79a58178a64eef3a14acd4275f81ec6fef82c0db1c6
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 6, 2026.

Transparency log

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

Download URL tree_sitter_toolang-0.4.0a3-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 73.0 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
f5e9f4fb8ff9ebba4ecdb08434659a4af42faec87d0fe9d22ddcd77571372d04
BLAKE2b-256 checksum
How to use checksums
f2a31c3801f8ba59f36bf876b186fb72737737da3aee1b280030ee4310e1167a
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 6, 2026.

Transparency log

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

Download URL tree_sitter_toolang-0.4.0a3-cp311-abi3-macosx_10_9_universal2.whl
Size 86.2 kB
Tags CPython 3.11 abi3 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
2b382c552bc46a86bb940483dc7040c295134c20d49f0bc137d5aaed118c9d76
BLAKE2b-256 checksum
How to use checksums
8ad049848f3d5678e88da1fc3a09ca780abdb1342c46c48096c9fa1d89ae1f0f
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 6, 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