Toolang grammar for tree-sitter
Project description
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"use 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.0.6"
let language = tree_sitter::Language::new(tree_sitter_toolang::LANGUAGE);
Development
Edit:
grammar.jsqueries/*.scmtest/corpus/*.txt
Regenerate and test:
npm install
npm run generate
npm test
npm run test:cli
npm run build:wasm
cargo test
python -m pip install -e .[tests]
pytest tests
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,pyproject.toml, andCargo.toml. - Confirm CI is green.
- Push the version commit to
main. - Create and push a matching tag such as
v0.0.6. - 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tree_sitter_toolang-0.0.6.tar.gz.
File metadata
- Download URL: tree_sitter_toolang-0.0.6.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c705afefea0e8fa0e12a3e70339e96f4af4783e091c2270ad885337a80e2ec06
|
|
| MD5 |
f0986e45c6c712efef6d9b4443e80370
|
|
| BLAKE2b-256 |
06d98a7216652be7ecd5254d8cca274daec0389d2fc6ab61de7552c83a2ea114
|
Provenance
The following attestation bundles were made for tree_sitter_toolang-0.0.6.tar.gz:
Publisher:
release.yml on openhat-ai/tree-sitter-toolang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_sitter_toolang-0.0.6.tar.gz -
Subject digest:
c705afefea0e8fa0e12a3e70339e96f4af4783e091c2270ad885337a80e2ec06 - Sigstore transparency entry: 1253366985
- Sigstore integration time:
-
Permalink:
openhat-ai/tree-sitter-toolang@7720ba871b30c515fed38b0734118f8e51a24f21 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/openhat-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7720ba871b30c515fed38b0734118f8e51a24f21 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tree_sitter_toolang-0.0.6-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: tree_sitter_toolang-0.0.6-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 18.1 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67cce86f0e6cb908f670eb53ff95cfcd7ac9d39352b8ffe1b28ec2202528fbe0
|
|
| MD5 |
0d7e265ad1c176097ac54861c29cb6a8
|
|
| BLAKE2b-256 |
1b9e24a222e73e4d7e0b8f4ce91b2d06a88db4d6e751d2e4baea78cf495c3b02
|
Provenance
The following attestation bundles were made for tree_sitter_toolang-0.0.6-cp310-abi3-win_amd64.whl:
Publisher:
release.yml on openhat-ai/tree-sitter-toolang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_sitter_toolang-0.0.6-cp310-abi3-win_amd64.whl -
Subject digest:
67cce86f0e6cb908f670eb53ff95cfcd7ac9d39352b8ffe1b28ec2202528fbe0 - Sigstore transparency entry: 1253368321
- Sigstore integration time:
-
Permalink:
openhat-ai/tree-sitter-toolang@7720ba871b30c515fed38b0734118f8e51a24f21 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/openhat-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7720ba871b30c515fed38b0734118f8e51a24f21 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tree_sitter_toolang-0.0.6-cp310-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: tree_sitter_toolang-0.0.6-cp310-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 26.7 kB
- Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1131413c34736eaf53198f2e343a5c301a3b806bd99231cac3662a0fe97d34e
|
|
| MD5 |
fdbfe7fd2d4466ecd009f04c70643648
|
|
| BLAKE2b-256 |
1e256e2fae5f52df39249e34bb61662e326ffed7b6fcbd6ab44a32170e8617fe
|
Provenance
The following attestation bundles were made for tree_sitter_toolang-0.0.6-cp310-abi3-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on openhat-ai/tree-sitter-toolang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_sitter_toolang-0.0.6-cp310-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
f1131413c34736eaf53198f2e343a5c301a3b806bd99231cac3662a0fe97d34e - Sigstore transparency entry: 1253367681
- Sigstore integration time:
-
Permalink:
openhat-ai/tree-sitter-toolang@7720ba871b30c515fed38b0734118f8e51a24f21 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/openhat-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7720ba871b30c515fed38b0734118f8e51a24f21 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tree_sitter_toolang-0.0.6-cp310-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: tree_sitter_toolang-0.0.6-cp310-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 28.1 kB
- Tags: CPython 3.10+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6173a60172fe26d42eae636492b347c2b2993cdce595dfdebdd7d13a279faaa9
|
|
| MD5 |
ef72eafdfda661b52700a132e795100a
|
|
| BLAKE2b-256 |
6e785f36e74e9f3eea77d6a363383e63c71ebc1bd2d21d133eae70cf26c12c0a
|
Provenance
The following attestation bundles were made for tree_sitter_toolang-0.0.6-cp310-abi3-musllinux_1_2_aarch64.whl:
Publisher:
release.yml on openhat-ai/tree-sitter-toolang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_sitter_toolang-0.0.6-cp310-abi3-musllinux_1_2_aarch64.whl -
Subject digest:
6173a60172fe26d42eae636492b347c2b2993cdce595dfdebdd7d13a279faaa9 - Sigstore transparency entry: 1253368166
- Sigstore integration time:
-
Permalink:
openhat-ai/tree-sitter-toolang@7720ba871b30c515fed38b0734118f8e51a24f21 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/openhat-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7720ba871b30c515fed38b0734118f8e51a24f21 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tree_sitter_toolang-0.0.6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: tree_sitter_toolang-0.0.6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 28.9 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81bc7f2f2a0a6dad23ea50b7663d8aa598d3760b8e41fbfab78c5fcbbd1f376c
|
|
| MD5 |
a00ecd01f912a57b479bab7a9c533896
|
|
| BLAKE2b-256 |
977465fb0b1853bf9f4634e036bc0cf29b00b1b2d65abc5b96e79e9a914a4d3b
|
Provenance
The following attestation bundles were made for tree_sitter_toolang-0.0.6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:
Publisher:
release.yml on openhat-ai/tree-sitter-toolang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_sitter_toolang-0.0.6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl -
Subject digest:
81bc7f2f2a0a6dad23ea50b7663d8aa598d3760b8e41fbfab78c5fcbbd1f376c - Sigstore transparency entry: 1253367204
- Sigstore integration time:
-
Permalink:
openhat-ai/tree-sitter-toolang@7720ba871b30c515fed38b0734118f8e51a24f21 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/openhat-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7720ba871b30c515fed38b0734118f8e51a24f21 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tree_sitter_toolang-0.0.6-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.
File metadata
- Download URL: tree_sitter_toolang-0.0.6-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
- Upload date:
- Size: 26.9 kB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96468755c88991f25e942ebf0d47f6892e78d42411c67d02a597bf90c71af59d
|
|
| MD5 |
7eea4c680354db4cf916393c459bcc39
|
|
| BLAKE2b-256 |
de4ab050d98b76cb44e972a6edc7b6400d974a7cd2e0fc817a9ba9770c618b8d
|
Provenance
The following attestation bundles were made for tree_sitter_toolang-0.0.6-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:
Publisher:
release.yml on openhat-ai/tree-sitter-toolang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_sitter_toolang-0.0.6-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl -
Subject digest:
96468755c88991f25e942ebf0d47f6892e78d42411c67d02a597bf90c71af59d - Sigstore transparency entry: 1253367458
- Sigstore integration time:
-
Permalink:
openhat-ai/tree-sitter-toolang@7720ba871b30c515fed38b0734118f8e51a24f21 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/openhat-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7720ba871b30c515fed38b0734118f8e51a24f21 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tree_sitter_toolang-0.0.6-cp310-abi3-macosx_10_9_universal2.whl.
File metadata
- Download URL: tree_sitter_toolang-0.0.6-cp310-abi3-macosx_10_9_universal2.whl
- Upload date:
- Size: 23.5 kB
- Tags: CPython 3.10+, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1345e48db60dfad45843f29013eb8450a2d86bd0e604372ad43f25cc24937a28
|
|
| MD5 |
21a4695ed46be1a591aafe2dcdf1020c
|
|
| BLAKE2b-256 |
37ed5eeba5ec98fe92f800521ae04a24c919216cb4ca2251f3b3b473c121f16b
|
Provenance
The following attestation bundles were made for tree_sitter_toolang-0.0.6-cp310-abi3-macosx_10_9_universal2.whl:
Publisher:
release.yml on openhat-ai/tree-sitter-toolang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_sitter_toolang-0.0.6-cp310-abi3-macosx_10_9_universal2.whl -
Subject digest:
1345e48db60dfad45843f29013eb8450a2d86bd0e604372ad43f25cc24937a28 - Sigstore transparency entry: 1253367933
- Sigstore integration time:
-
Permalink:
openhat-ai/tree-sitter-toolang@7720ba871b30c515fed38b0734118f8e51a24f21 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/openhat-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7720ba871b30c515fed38b0734118f8e51a24f21 -
Trigger Event:
push
-
Statement type: