Remove SelfParam, add an AddrPattern instead. (#3506)

This is intended to make the representation of a `self` pattern be more
similar to other patterns.
This commit is contained in:
Richard Smith
2023-12-14 20:53:51 +00:00
committed by GitHub
parent de0c02ddae
commit fbb4ecf319
22 changed files with 152 additions and 101 deletions
+2 -1
View File
@@ -322,6 +322,7 @@ class NodeStack {
// Translate a parse node kind to the enum ID kind it should always provide.
static constexpr auto ParseNodeKindToIdKind(Parse::NodeKind kind) -> IdKind {
switch (kind) {
case Parse::NodeKind::Address:
case Parse::NodeKind::ArrayExpr:
case Parse::NodeKind::BindingPattern:
case Parse::NodeKind::CallExpr:
@@ -361,6 +362,7 @@ class NodeStack {
return IdKind::InterfaceId;
case Parse::NodeKind::BaseName:
case Parse::NodeKind::IdentifierName:
case Parse::NodeKind::SelfValueName:
return IdKind::NameId;
case Parse::NodeKind::ArrayExprSemi:
case Parse::NodeKind::ClassIntroducer:
@@ -375,7 +377,6 @@ class NodeStack {
case Parse::NodeKind::ReturnedModifier:
case Parse::NodeKind::ReturnStatementStart:
case Parse::NodeKind::ReturnVarModifier:
case Parse::NodeKind::SelfValueName:
case Parse::NodeKind::StructLiteralOrStructTypeLiteralStart:
case Parse::NodeKind::TuplePatternStart:
case Parse::NodeKind::VariableInitializer: