mirror of
https://github.com/astral-sh/ruff.git
synced 2026-11-21 12:16:15 +08:00
Carry the typed IDs returned by node constructors through parsing and recovery. Parse source-ordered argument and parameter lists directly. Keep ownership of the tree with the parsed module.
1.5 KiB
1.5 KiB
Ruff Python Parser
Ruff's Python parser is a hand-written recursive descent parser which can parse Python source code into an Abstract Syntax Tree (AST). It also utilizes the Pratt parsing technique to parse expressions with different precedence.
The AST architecture describes how Python syntax is stored and traversed.
Try out the parser in the playground.
Contributing
Refer to the contributing guidelines to get started and GitHub issues with the parser label for issues that need help.
Versioning
This crate is an internal component of Ruff. The Rust API exposed here is unstable and will have frequent breaking changes.
This version (0.0.23) is a component of Ruff 0.17.6. The source can be found here.
See Ruff's crate versioning policy for details on versioning.