mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-07 21:25:08 +00:00
Remove customizable reference enum names (#15647)
The AST generator creates a reference enum for each syntax group — an enum where each variant contains a reference to the relevant syntax node. Previously you could customize the name of the reference enum for a group — primarily because there was an existing `ExpressionRef` type that wouldn't have lined up with the auto-derived name `ExprRef`. This follow-up PR is a simple search/replace to switch over to the auto-derived name, so that we can remove this customization point.
This commit is contained in:
parent
fa546b20a6
commit
ef85c682bd
11 changed files with 223 additions and 231 deletions
|
@ -79,7 +79,7 @@ impl<'a> Index<NodeId> for Nodes<'a> {
|
|||
///
|
||||
/// TODO(charlie): Replace with [`ruff_python_ast::AnyNodeRef`]. This requires migrating
|
||||
/// the rest of the codebase to use [`ruff_python_ast::AnyNodeRef`] and related abstractions,
|
||||
/// like [`ruff_python_ast::ExpressionRef`] instead of [`Expr`].
|
||||
/// like [`ruff_python_ast::ExprRef`] instead of [`Expr`].
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub enum NodeRef<'a> {
|
||||
Stmt(&'a Stmt),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue