Skip to main content

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.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.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 current syntax and 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
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:

  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. Push the version commit to main.
  4. Create and push a matching tag such as v0.3.3.
  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.

Metadata

Release files for tree-sitter-toolang 0.3.4

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.3.4
File Size Uploaded
tree_sitter_toolang-0.3.4.tar.gz 115.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tree-sitter-toolang 0.3.4
File
tree_sitter_toolang-0.3.4-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
tree_sitter_toolang-0.3.4-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
tree_sitter_toolang-0.3.4-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
tree_sitter_toolang-0.3.4-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details
tree_sitter_toolang-0.3.4-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.4-cp310-abi3-macosx_10_9_universal2.whl CPython 3.10 abi3 macOS 10.9+ universal2 (ARM64, x86-64) Details

Total release size: 556.6 kB

Release files / tree_sitter_toolang-0.3.4.tar.gz

Download URL tree_sitter_toolang-0.3.4.tar.gz
Size 115.9 kB
Tags Source
SHA-256 checksum
How to use checksums
adac2523052b3db40acb4e3ea0c7b3eb28978758c338967b9095093d60c868fc
BLAKE2b-256 checksum
How to use checksums
834988f8b59a4d5481be473909e883c826a5d9c7fefdaf10dfb2cb6bafc15300
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 3, 2026.

Transparency log

Release files / tree_sitter_toolang-0.3.4-cp310-abi3-win_amd64.whl

Download URL tree_sitter_toolang-0.3.4-cp310-abi3-win_amd64.whl
Size 52.7 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c5ae1156ddc7264241a33b22e59e5b2de5055fe25959b6e7cbca68978d23137e
BLAKE2b-256 checksum
How to use checksums
dba7e5a49656d2be17159ce6975ba1a922000360fc553358d3ac7038ba68f776
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 3, 2026.

Transparency log

Release files / tree_sitter_toolang-0.3.4-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL tree_sitter_toolang-0.3.4-cp310-abi3-musllinux_1_2_x86_64.whl
Size 73.7 kB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
d3f033c1850793204805692152b6a9fd027112ee13ac2588075c920ffd1bddd2
BLAKE2b-256 checksum
How to use checksums
342ed2e426b3344da4dfba7dcf7e20cab77d860238b29d1a084f9188388066c5
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 3, 2026.

Transparency log

Release files / tree_sitter_toolang-0.3.4-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL tree_sitter_toolang-0.3.4-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
e36156eed4100c8fae565b122b34b16703019a33b5f0f581d8da42e94388d7bd
BLAKE2b-256 checksum
How to use checksums
34fb5990ae6248e6503986818bf780926d6e0b0853f4b4393afbb12656d8c935
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 3, 2026.

Transparency log

Release files / tree_sitter_toolang-0.3.4-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL tree_sitter_toolang-0.3.4-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
254fcd429ef974ced21f2cfbabe823c0568cb60e2af084903f98b1d4b8ceebc1
BLAKE2b-256 checksum
How to use checksums
c267a285b8690181fcd164b3e8b42b1b50760b8206d39c01813007153cd3f4ef
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 3, 2026.

Transparency log

Release files / tree_sitter_toolang-0.3.4-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL tree_sitter_toolang-0.3.4-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 74.0 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
4a46c2bc50a7156f626c3b5a8167e8da7ebacffffe99891f9ca396f8f640e607
BLAKE2b-256 checksum
How to use checksums
8ca9de879a65e1747c295307dc29dfe644f72341429de23788b6b2145d3feb17
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 3, 2026.

Transparency log

Release files / tree_sitter_toolang-0.3.4-cp310-abi3-macosx_10_9_universal2.whl

Download URL tree_sitter_toolang-0.3.4-cp310-abi3-macosx_10_9_universal2.whl
Size 92.4 kB
Tags CPython 3.10 abi3 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
4aebfb664ce8531d755728183edc404cd9a41e58f57496a013ddb34bb950bd62
BLAKE2b-256 checksum
How to use checksums
39065e9d61f5c598bcc605f6e9a71a0e115899f8f395ada4c8a5fa322535ecbb
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 3, 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