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.3.tar.gz
(16.1 kB
view details)
Built Distribution
synr-0.3-py3-none-any.whl
(17.4 kB
view details)
File details
Details for the file synr-0.3.tar.gz
.
File metadata
- Download URL: synr-0.3.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.8.8 Linux/5.4.0-1040-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2d8b12233e732673b31a2263bf87e22135b8debaf9b526c2974fae19c6364d6 |
|
MD5 | e4de88c8737a85d2df51a0f0f3fb013f |
|
BLAKE2b-256 | 54be51ef48eda0df5ceb9e8881ef3d1efd91fd1aa9e419b58075978cd97d8be8 |
File details
Details for the file synr-0.3-py3-none-any.whl
.
File metadata
- Download URL: synr-0.3-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.8.8 Linux/5.4.0-1040-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bf274009cc806b499078891b3b9c67cb4c047c8bf14d2a3c53d72d24ae92542 |
|
MD5 | ac8f42a67a2b914ca4f17d59ca08087a |
|
BLAKE2b-256 | b1d4be7565f4c74f9bc76bb77b6f245e4fad89246c1b3621256fbcac1f993fcc |