Adds parsing of new type soft keyword for defining type aliases.
Supports type alias statements as defined in PEP 695 e.g.
# 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]]
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.
All type parameter kinds are supported as in #95.
Builds on soft keyword abstractions introduced in https://github.com/RustPython/RustPython/pull/4519