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

@ -26,10 +26,6 @@
# Controls the name of the AnyNodeRef::is_foo_bar method. The default is the
# group name in snake_case.
#
# ref_enum_ty:
# The name of the reference enum that we create for this group. The default
# is the group name with `Ref` added to the end.
#
# rustdoc:
# A rustdoc comment that is added to the group's enums.
#
@ -51,7 +47,6 @@ ModExpression = {}
add_suffix_to_is_methods = true
anynode_is_label = "statement"
rustdoc = "/// See also [stmt](https://docs.python.org/3/library/ast.html#ast.stmt)"
ref_enum_ty = "StatementRef"
[Stmt.nodes]
StmtFunctionDef = {}
@ -84,7 +79,6 @@ StmtIpyEscapeCommand = {}
add_suffix_to_is_methods = true
anynode_is_label = "expression"
rustdoc = "/// See also [expr](https://docs.python.org/3/library/ast.html#ast.expr)"
ref_enum_ty = "ExpressionRef"
[Expr.nodes]
ExprBoolOp = {}