mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-07 13:15:21 +00:00
No description
![]() Extends #95 Closes #82 Adds parsing of new `type` soft keyword for defining type aliases. Supports type alias statements as defined in PEP 695 e.g. ```python # A non-generic type alias type IntOrStr = int | str # A generic type alias type ListOrSet[T] = list[T] | set[T] # A type alias that includes a forward reference type AnimalOrVegetable = Animal | "Vegetable" # A generic self-referential type alias type RecursiveList[T] = T | list[RecursiveList[T]] ``` All type parameter kinds are supported as in #95. Builds on soft keyword abstractions introduced in https://github.com/RustPython/RustPython/pull/4519 |
||
---|---|---|
.github/workflows | ||
ast | ||
ast-pyo3 | ||
core | ||
format | ||
literal | ||
parser | ||
ruff_source_location | ||
ruff_text_size | ||
scripts | ||
.cspell.json | ||
.gitattributes | ||
.gitignore | ||
Cargo.toml | ||
LICENSE | ||
README.md |
RustPython parser as a library
This project is forked from RustPython project. The parser is one of the core part of RustPython and Ruff project.
We try to keep these crates as a well-packaged library for more potential users.
Projects
- RustPython is a Python interpreter
- Ruff is an extremely fast Python linter
- Pylyzer is a static code analyzer / language server for Python
- Baembal is a Python package to accelerate
ast.parse