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:
Douglas Creager 2025-01-21 13:46:31 -05:00 committed by GitHub
parent fa546b20a6
commit ef85c682bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 223 additions and 231 deletions

View file

@ -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),