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.0.11"
let language = tree_sitter::Language::new(tree_sitter_toolang::LANGUAGE);

Development

Edit:

  • grammar.js
  • queries/*.scm
  • test/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:

  1. Bump the version in package.json, pyproject.toml, and Cargo.toml.
  2. Confirm CI is green.
  3. Push the version commit to main.
  4. Create and push a matching tag such as v0.0.11.
  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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree_sitter_toolang-0.2.0.tar.gz (74.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_toolang-0.2.0-cp310-abi3-win_amd64.whl (54.4 kB view details)

Uploaded CPython 3.10+Windows x86-64

tree_sitter_toolang-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl (62.1 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

tree_sitter_toolang-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl (61.5 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

tree_sitter_toolang-0.2.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (62.3 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

tree_sitter_toolang-0.2.0-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (62.4 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

tree_sitter_toolang-0.2.0-cp310-abi3-macosx_10_9_universal2.whl (96.1 kB view details)

Uploaded CPython 3.10+macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file tree_sitter_toolang-0.2.0.tar.gz.

File metadata

  • Download URL: tree_sitter_toolang-0.2.0.tar.gz
  • Upload date:
  • Size: 74.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tree_sitter_toolang-0.2.0.tar.gz
Algorithm Hash digest
SHA256 71f9fddba0cf07784aba02792eddbc1e12a00917eac1eeb8662e324a82223345
MD5 f38faa6fa77b3e1a18bf294d2043cd15
BLAKE2b-256 0f3905a6613d1f626529276aca58b1203c5e15d90ee08e526da827e1669f4d50

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.0.tar.gz:

Publisher: release.yml on openhat-ai/tree-sitter-toolang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_toolang-0.2.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_toolang-0.2.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 7749174c52e098289b2896512900ac8a7a69d843b465e93ad75e53e23abb027b
MD5 33dbb6127547745db1843ed9148bb78f
BLAKE2b-256 2f3cb4ff3297ea70a0af97f6146a9222d88922bd5c5f0b58af083534b9f279e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.0-cp310-abi3-win_amd64.whl:

Publisher: release.yml on openhat-ai/tree-sitter-toolang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_toolang-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_toolang-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f0b09f0b16225fd5375758bf7fda6ecf1df0fc725cbffe3437031f5d4fd7c93f
MD5 fdff52f878eb5aa7beede6e65f2ee77a
BLAKE2b-256 8e88cf82e775d94f43c2c34274c2d4770ae6f555a9a746ae102e225279c9900b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on openhat-ai/tree-sitter-toolang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_toolang-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_toolang-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 57ddd276d261140379f43f05568d4aa7f04e0dfdb6fbcee198a3b0490a8f6f91
MD5 2fa0b2f12b112245fa8695fe90144869
BLAKE2b-256 c6728b290c74ad41df9842e1a2b9c49907401eb08fee8c5dc1b06365b2eaa1e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on openhat-ai/tree-sitter-toolang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_toolang-0.2.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_toolang-0.2.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fa788abfcfa3efcadcc91460f614e091ba0edcfb44934d139575ab11ea80abb3
MD5 211972e9f8dd11c6bbc05331b6d40aa7
BLAKE2b-256 d5b9df7806c719fe2bbb52055cd28e2b4333acbc9dfd70e837d4fb75fccdb6c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yml on openhat-ai/tree-sitter-toolang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_toolang-0.2.0-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_toolang-0.2.0-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 65dfa1829c95a9be1c2767b8d3cfd565becfbe120280089f4f180ba95c94b913
MD5 ff4b5fe5adad2dec4616c47bf9bcf332
BLAKE2b-256 121c1b64dacd8ba8a7f5925ce72855b57dc5bff24d2caf34dc8282918e2bd4d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.0-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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_toolang-0.2.0-cp310-abi3-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for tree_sitter_toolang-0.2.0-cp310-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0dcd0869aa2581422acdca389ef7c2e0d7ae0c36f0520ac72da4d445765167eb
MD5 e99c416dc1d9d6ba37aefe5091fe7cc5
BLAKE2b-256 fc6740bb39a85371287a40200f883b925a12c9f1ff52871bc1c7a20fc019c8df

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.0-cp310-abi3-macosx_10_9_universal2.whl:

Publisher: release.yml on openhat-ai/tree-sitter-toolang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.1

7 files

This release

0.2.0 This release

7 files

0.1.3

7 files

0.1.2

7 files

0.1.1

7 files

0.0.16

7 files

0.0.15

7 files

0.0.14

7 files

0.0.13

7 files

0.0.12

7 files

0.0.11

7 files

0.0.10

7 files

0.0.9

7 files

0.0.6

7 files

0.0.5

5 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page