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.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.3.2 adds #@ module documentation and ## @param NAME DESCRIPTION parameter documentation, with structured CST fields and highlighting. Existing ##! module comments remain accepted. Public comment nodes are now plain_comment, shebang_comment, item_doc_comment, and module_doc_comment; consumers must update old node names. See comment syntax and 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.2.
  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.2

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.2
File Size Uploaded
tree_sitter_toolang-0.3.2.tar.gz 98.6 kB Details

Built distributions (wheels)

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

Total release size: 471.7 kB

Release files / tree_sitter_toolang-0.3.2.tar.gz

Download URL tree_sitter_toolang-0.3.2.tar.gz
Size 98.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8aee2e872e1864bd8eb13824571ed9104f06854c0f06f0650820d834fd797739
BLAKE2b-256 checksum
How to use checksums
1204286b4a382db13644e06b3df01a3a982edee51b830f3f9c781c3053a0a28b
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 13, 2026.

Transparency log

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

Download URL tree_sitter_toolang-0.3.2-cp310-abi3-win_amd64.whl
Size 43.7 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0efd5e586aa8fe0b436223db8d9638a3f055b41cd3a2f4f6fb1a7177e99adc68
BLAKE2b-256 checksum
How to use checksums
7bfce1599506852be0ad5363ca0bd27f99ea8048eaf2cef6073594e81452a7fb
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 13, 2026.

Transparency log

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

Download URL tree_sitter_toolang-0.3.2-cp310-abi3-musllinux_1_2_x86_64.whl
Size 63.5 kB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
d3402843bcd399b3655195619bc978e125db77dc5073f203900bd916ac11f4e4
BLAKE2b-256 checksum
How to use checksums
ccdb0e7da57cc124e0ced9450b065424f3033f38113be1c90576be6f0c02482e
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 13, 2026.

Transparency log

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

Download URL tree_sitter_toolang-0.3.2-cp310-abi3-musllinux_1_2_aarch64.whl
Size 63.3 kB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
7ab26aca253cfe215a60f465963e82812affe7b185d417b97414d247ca51a604
BLAKE2b-256 checksum
How to use checksums
53a41ebe4281af551d4ecca703d048183712848529a4bb0cc6fe4ed562cdfdd6
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 13, 2026.

Transparency log

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

Download URL tree_sitter_toolang-0.3.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 64.4 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
e38677e8c52aef7e71777cc3ce33de41e03e6686f6dbc39a450b7416ae6ff8d0
BLAKE2b-256 checksum
How to use checksums
95eadc3a23efe51736dd1d62d7d07665e19aa2fdd0e3a8699f2ac93c838bb6ec
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 13, 2026.

Transparency log

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

Download URL tree_sitter_toolang-0.3.2-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 63.6 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
c1144f1bb67194f1df923080c736f7311ab3a042316f3b793529389fe68ee277
BLAKE2b-256 checksum
How to use checksums
d9493b6ac56f9ca1def9a7c610702ad3b28af1c3611eca16a0c43ae3c9a46210
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 13, 2026.

Transparency log

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

Download URL tree_sitter_toolang-0.3.2-cp310-abi3-macosx_10_9_universal2.whl
Size 74.5 kB
Tags CPython 3.10 abi3 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
b45bdb4dc91913cf1c017f487c94417d35abc0f43cd210fc3d67a56df3296d8f
BLAKE2b-256 checksum
How to use checksums
e4fb08c09c728ac2af7cfe1867c7cf156eb60afe78a5120b4567de32838a7b47
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 13, 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