A consistent AST for Python
Project description
Synr
Synr is a library that provides a stable Abstract Syntax Tree for Python.
Features
- The Synr AST does not change between Python versions.
- Every AST node contains line and column information.
- There is a single AST node for assignments (compared to three in Python's ast module).
- Support for returning multiple errors at once.
- Support for custom error reporting.
Usage
import synr
def test_program(x: int):
return x + 2
# Parse a Python function into an AST
ast = synr.to_ast(test_program, synr.PrinterDiagnosticContext())
Documentation
Please see https://synr.readthedocs.io/en/latest/ for documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
synr-0.2.0.tar.gz
(15.7 kB
view details)
Built Distribution
synr-0.2.0-py3-none-any.whl
(17.1 kB
view details)
File details
Details for the file synr-0.2.0.tar.gz
.
File metadata
- Download URL: synr-0.2.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.4.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba3cafdc8cb4cc4d756dc3f9e09ede679fea26776a2f4487678e2f07aa82ffe7 |
|
MD5 | 15454e93ac8bbd5466f5b204b29b27b9 |
|
BLAKE2b-256 | 7206ae298be2ab1fb39081beab579bbb718937be4e738a85d447d9e0711c21c4 |
File details
Details for the file synr-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: synr-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.4.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9231ce181b353d31131d53026e92bb1a801e91014fa3d0d43ffd140fff0dca83 |
|
MD5 | 8b7e37a7d6c785f10f55254fbc7933b6 |
|
BLAKE2b-256 | fade6645fcc88b2a50310214bc7b63d8ad6cb0b041acba477a1bb743555f137e |