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.1.tar.gz (74.8 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.1-cp310-abi3-win_amd64.whl (54.3 kB view details)

Uploaded CPython 3.10+Windows x86-64

tree_sitter_toolang-0.2.1-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.1-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.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (62.4 kB view details)

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

tree_sitter_toolang-0.2.1-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (62.5 kB view details)

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

tree_sitter_toolang-0.2.1-cp310-abi3-macosx_10_9_universal2.whl (96.2 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.1.tar.gz.

File metadata

  • Download URL: tree_sitter_toolang-0.2.1.tar.gz
  • Upload date:
  • Size: 74.8 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.1.tar.gz
Algorithm Hash digest
SHA256 d1bc069ee9b279272e92926ba017b6eedb9a2b107ac9d6219558a21197e0b8f2
MD5 d6e11f155ac42472f03173e49388fb15
BLAKE2b-256 228f1508aea8030d23eae5c5f4a7376b6a9a7e40fc59848a74e79a100fff4552

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.1.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.1-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_toolang-0.2.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 de41251b7754b12f9d3fc66c1f324404f73e599c2ad542dcc0a73f4d51a22a27
MD5 d50d2992ab6ce82b9014aaeca0d65468
BLAKE2b-256 04b65524f2c27268eacbd5586e42e1554e3842835062f5e017b3f74345eb230f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.1-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.1-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_toolang-0.2.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7f496484d6f1df5dd94bb8274ced73787e002981122129bf03a69829cccd1baa
MD5 acd5cc9404b53893567a3c761d2fce11
BLAKE2b-256 973990b90cf66fd1da926879a5ea07f2be855a817789a81500c8d290b9133a47

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.1-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.1-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_toolang-0.2.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 8058940e93d85cb1fbab43bbd32673268b9882e0a68073608ecb92dce4767b0e
MD5 91b47858a91ddae2c912396df5010bd5
BLAKE2b-256 ff7293f53c0a34462a89f18ff025fb09e8a5a6c6cc55da52fe30da382793ffad

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.1-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.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_toolang-0.2.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 14b9f57ec895e6e3e898f9deb0c1f8878f4401b067418c467828b6a835ca47db
MD5 7724f6cfbcf84f18ec6f161b960c8c93
BLAKE2b-256 9fa8c91631d5cac4608c3865c0db180cc864513b90f03910694d034d88d202f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.1-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.1-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.1-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 64eb309d6f676283496da55756e62f75b1cfbe1a6b680d7fc35ff8bdbb887a59
MD5 6d272f99107185ee8011b86c326490bb
BLAKE2b-256 997679568b290ac2fcf7a972d74be6961fab2b031d67a047bb429e1dfcaddd32

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.2.1-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.1-cp310-abi3-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for tree_sitter_toolang-0.2.1-cp310-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ebaea3876bb750a90ef97108a45f5333e0d09313f7396d720692ea62ade18646
MD5 fa64334f5b253afac51423979db208e9
BLAKE2b-256 c208db8a14298a01a7b2003d4555ffcc6a18822b41a50a5151bf962b390f4156

See more details on using hashes here.

Provenance

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

This release

0.2.1 This release

7 files

0.2.0

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