Rename self/Self enums to SelfValueIdentifier/SelfTypeIdentifier (#2701)

Using `Identifier` because `self` and `Self` will resolve to different things. While `i32` uses `Literal`, it'd always resolve to the same type.
This commit is contained in:
Jon Ross-Perkins
2023-03-22 10:07:09 -07:00
committed by GitHub
parent df289efac4
commit e89fb83e7e
11 changed files with 104 additions and 106 deletions
+8 -6
View File
@@ -107,7 +107,8 @@ CARBON_PARSE_NODE_KIND_BRACKET(DeducedParameterList, DeducedParameterListStart)
// _external_: type expression
// [Generic]PatternBinding
//
// Address and Template may be parents to [Generic]PatternBinding, in that order.
// Address and Template may be parents to [Generic]PatternBinding, in that
// order.
CARBON_PARSE_NODE_KIND_CHILD_COUNT(PatternBinding, 2)
CARBON_PARSE_NODE_KIND_CHILD_COUNT(GenericPatternBinding, 2)
CARBON_PARSE_NODE_KIND_CHILD_COUNT(Address, 1)
@@ -337,12 +338,13 @@ CARBON_PARSE_NODE_KIND_BRACKET(NamedConstraintDefinition,
CARBON_PARSE_NODE_KIND_BRACKET(NamedConstraintDeclaration,
NamedConstraintIntroducer)
// The `self` name and `Self` type keywords. Typically of the form `self: Self`:
// SelfIdentifier
// SelfType
// The `self` value and `Self` type identifier keywords. Typically of the form
// `self: Self`:
// SelfValueIdentifier
// SelfTypeIdentifier
// PatternBinding
CARBON_PARSE_NODE_KIND_CHILD_COUNT(SelfIdentifier, 0)
CARBON_PARSE_NODE_KIND_CHILD_COUNT(SelfType, 0)
CARBON_PARSE_NODE_KIND_CHILD_COUNT(SelfValueIdentifier, 0)
CARBON_PARSE_NODE_KIND_CHILD_COUNT(SelfTypeIdentifier, 0)
#undef CARBON_PARSE_NODE_KIND
#undef CARBON_PARSE_NODE_KIND_BRACKET