mirror of
https://github.com/astral-sh/ruff
synced 2026-01-08 15:14:19 -05: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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user