Metadata-Version: 2.4
Name: tree-sitter-toolang
Version: 0.4.0a5
Summary: Toolang grammar for tree-sitter
Author: Brice Yan
License-Expression: MIT
Project-URL: Homepage, https://github.com/openhat-ai/tree-sitter-toolang
Project-URL: Repository, https://github.com/openhat-ai/tree-sitter-toolang
Project-URL: Issues, https://github.com/openhat-ai/tree-sitter-toolang/issues
Keywords: incremental,parsing,toolang,tree-sitter
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: C
Classifier: Topic :: Software Development :: Compilers
Classifier: Topic :: Text Processing :: Linguistic
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: core
Requires-Dist: tree-sitter~=0.25; extra == "core"
Provides-Extra: tests
Requires-Dist: pytest>=8; extra == "tests"
Requires-Dist: tree-sitter~=0.25; extra == "tests"
Requires-Dist: setuptools>=77.0.3; extra == "tests"
Requires-Dist: wheel; extra == "tests"
Dynamic: license-file

# tree-sitter-toolang

Tree-sitter parser for [Toolang](https://github.com/openhat-ai/toolang) `.too`
files, with Python and Rust bindings and editor queries.

## Python

```python
from tree_sitter import Language, Parser
import tree_sitter_toolang

parser = Parser(Language(tree_sitter_toolang.language()))
tree = parser.parse(b"flow hello:\n  run: Hello.\n")
```

The package exposes `HIGHLIGHTS_QUERY`, `INJECTIONS_QUERY`, `INDENTS_QUERY`,
`OUTLINE_QUERY`, and `TAGS_QUERY` as query strings.

## Rust

```rust
let mut parser = tree_sitter::Parser::new();
parser.set_language(&tree_sitter_toolang::LANGUAGE.into())?;
let tree = parser.parse("flow hello:\n  run: Hello.\n", None).unwrap();
```

## Development

Development requires Node.js, a C compiler, Python, and Rust. Run these checks
from a configured checkout:

```bash
npm run check
.venv/bin/python -m pytest tests
.venv/bin/python -m unittest discover -s scripts -p 'test_*.py'
cargo test
```

See the [publishing guide](https://github.com/openhat-ai/tree-sitter-toolang/blob/main/docs/publishing.md)
for release instructions.
