mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-17 01:55:10 +00:00
[internal] Move Linter OperatorPrecedence
into ruff_python_ast
crate (#16162)
## Summary This change begins to resolve #16071 by moving the `OperatorPrecedence` structs from the `ruff_python_linter` crate into `ruff_python_ast`. This PR also implements `precedence()` methods on the `Expr` and `ExprRef` enums. ## Test Plan Since this change mainly shifts existing logic, I didn't add any additional tests. Existing tests do pass.
This commit is contained in:
parent
63dd68e0ed
commit
fa28dc5ccf
5 changed files with 193 additions and 168 deletions
|
@ -5,6 +5,7 @@ pub use expression::*;
|
|||
pub use generated::*;
|
||||
pub use int::*;
|
||||
pub use nodes::*;
|
||||
pub use operator_precedence::*;
|
||||
|
||||
pub mod comparable;
|
||||
pub mod docstrings;
|
||||
|
@ -16,6 +17,7 @@ mod int;
|
|||
pub mod name;
|
||||
mod node;
|
||||
mod nodes;
|
||||
pub mod operator_precedence;
|
||||
pub mod parenthesize;
|
||||
pub mod relocate;
|
||||
pub mod script;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue