Metadata-Version: 2.4
Name: zyntex
Version: 0.0.2
Summary: A high-level Python package to parse Zig code.
Home-page: https://github.com/xXenvy/zyra
Author: xXenvy
License: MIT
Project-URL: Source, https://github.com/xXenvy/zyra
Project-URL: Tracker, https://github.com/xXenvy/zyra/issues
Keywords: zig parser codegen
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Compilers
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# Zyntex - High-level Zig parser for Python
Zyntex focuses on high-level elements of Zig code (e.g. functions, variables, tests).
Function bodies and other low-level constructs are currently returned as raw strings.
Support for deeper elements is planned. Internally, it uses bindings to Zig's std AST parser,
making it both fast and memory-efficient.
Important: currently bindings are only available for `windows-x86_64`, `macos-x86_64`, and `linux-x86_64`.
On other architectures the library will not work. Support for additional targets is planned, 
but low priority.

## Features

- Parse Zig source from strings or files.
- High-performance, low-memory parsing powered by Zig’s `std` parser.
- Easy-to-use, Pythonic API designed for inspection and transformation of Zig code.
- Planned: code generation (printers) to emit Zig from Python objects.

## Installation

```bash
pip install zyntex
```

## Minimal example
```python
from typing import cast

from zyntex.syntax import VariableDeclaration
from zyntex import SourceCode

src = SourceCode("const result: usize = 15 + 15;")
variable = cast(VariableDeclaration, src.content[0])

print(variable.name)  # result
print(variable.const)  # True
```

## License
See the `LICENSE` file in the repository.

---
For questions or contributions, open an issue or PR on the project repository.
