This repository was archived by the owner on Jul 27, 2023. It is now read-only.
Tags: astral-sh/RustPython-Parser
Toggle v0.0.8's commit message
Fix decorator ranges
Incorrectly merged LALRPOP file
Toggle v0.0.6's commit message
Remove Range type parameter from AST nodes (#15)
Toggle v0.0.5's commit message
Fix range of keyword identifier (#14)
Toggle v0.0.4's commit message
Fix ArgWithDefault TextRange (#13)
Toggle v0.0.3's commit message
Add `TextRange` to `Identifier` (#8)
## Summary
This PR adds `TextRange` to `Identifier`. Right now, the AST only
includes ranges for identifiers in certain cases (`Expr::Name`,
`Keyword`, etc.), namely when the identifier comprises an entire AST
node. In Ruff, we do additional ad-hoc lexing to extract identifiers
from source code.
One frequent example: given a function `def f(): ...`, we lex to find
the range of `f`, for use in diagnostics.
Another: `except ValueError as e`, for which the AST doesn't include a
range for `e`.
Note that, as an optimization, we avoid storing the `TextRange` for
`Expr::Name`, since it's already included.
Toggle v0.0.2's commit message
Make malachite-bigint an optional dependency for rustpython-format (#12)
Toggle v0.0.1's commit message
Add `Decorator` node (#7)