Skip to main content

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.10"
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.10.
  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.

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

tree_sitter_toolang-0.0.10.tar.gz (34.3 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.0.10-cp310-abi3-win_amd64.whl (23.2 kB view details)

Uploaded CPython 3.10+Windows x86-64

tree_sitter_toolang-0.0.10-cp310-abi3-musllinux_1_2_x86_64.whl (38.2 kB view details)

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

tree_sitter_toolang-0.0.10-cp310-abi3-musllinux_1_2_aarch64.whl (39.8 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

tree_sitter_toolang-0.0.10-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (41.2 kB view details)

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

tree_sitter_toolang-0.0.10-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (38.4 kB view details)

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

tree_sitter_toolang-0.0.10-cp310-abi3-macosx_10_9_universal2.whl (34.7 kB view details)

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

File details

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

File metadata

  • Download URL: tree_sitter_toolang-0.0.10.tar.gz
  • Upload date:
  • Size: 34.3 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.0.10.tar.gz
Algorithm Hash digest
SHA256 739375f9463611c97bf10e7606cd843f61062630d9242c889b207d2565d9802b
MD5 7b5ee3b24db32987a8a75a9ca0308209
BLAKE2b-256 a40af91698580a57cb00e55273cb18c79033cc54d903f239290f635bbb3c8f49

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tree_sitter_toolang-0.0.10-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 42f958fe249f6fcbcc16aaddbc5ccf1b42465ea0f14b5bdf4600fd54e905f5f5
MD5 a75e1873766bf21ee5487aed086d0e69
BLAKE2b-256 27c81dc4795bee2988e88b79129bc1f393d0660bddfd284e87f554b46b7a2dec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tree_sitter_toolang-0.0.10-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5a2e4c5e8beb4e04f013d10f5f6357666bd2740d298158fc812021d48c2828f0
MD5 ae6546ce43b518ee4c8f591ef9583ca3
BLAKE2b-256 32483454cb27198022f10f990b4536b20bb5572c50b547b598a81f646482bb14

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tree_sitter_toolang-0.0.10-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 ee5aef8ba32a3d6c46b02fa36422609308eb2379a95437017f30d326786a5d80
MD5 f24d9817f9206a8ce59c0e4934c728ed
BLAKE2b-256 893591834588bb2437147a2ac3ca3ea291dd03ccd433418870a54a13ec667cf7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tree_sitter_toolang-0.0.10-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 817a4451bdfcc1e555e0a74e1ec61b0247a575a36941adb98100ae780984021d
MD5 b8c5a0019579c47b68506e01c9c858ef
BLAKE2b-256 1b341fef5c1b1dfc3d0bc526d29f28c80527a845b05b2610fbdc61c61c6de6c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_toolang-0.0.10-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.0.10-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.0.10-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 cf01b0c97ed052c21a2873cabe98506549a7680a0d93fb7b2da49bca6f7a4931
MD5 9b7cebb42abf76a3a64e24a91442f047
BLAKE2b-256 24c8ff55b46a058502d6a40cb8c32efc0d45117643751dd2838ae41cbcb51845

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tree_sitter_toolang-0.0.10-cp310-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9c67d393f80b534ce3949350f08fcf8b1fbb8d5a8690bb098946754cd2cab1b6
MD5 0b82cf8b2d7ada51654995d1b42ac78f
BLAKE2b-256 ab227695bec9e3d3756f4f775329ccfef99009296d9e449cc54864bddef6628f

See more details on using hashes here.

Provenance

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

Supported by

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