mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-22 23:12:39 +00:00
Replace the NodeKind StructFieldUnknown with InvalidParse. (#3482)
StructFieldUnknown was used previously for invalid parses. But we have added other, more common ways of talking about those; so this is removing the special-case.
This commit is contained in:
1 parent
032c0e017b
commit
6cc5dc7736
19 files changed
+22
-29
No files matched your search
@@ -613,7 +613,7 @@ CARBON_PARSE_NODE_KIND_CHILD_COUNT(IfExprElse, 3,
|
||||
// may repeat with StructComma as a separator.
|
||||
//
|
||||
// When a valid StructFieldType or StructFieldValue cannot be formed, elements
|
||||
// may be replaced by StructFieldUnknown, which may have a preceding sibling
|
||||
// may be replaced by InvalidParse, which may have a preceding sibling
|
||||
// StructFieldDesignator if one was successfully parsed.
|
||||
CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructLiteralOrStructTypeLiteralStart, 0,
|
||||
CARBON_TOKEN(OpenCurlyBrace))
|
||||
@@ -621,8 +621,6 @@ CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructFieldDesignator, 1,
|
||||
CARBON_TOKEN(Period))
|
||||
CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructFieldValue, 2, CARBON_TOKEN(Equal))
|
||||
CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructFieldType, 2, CARBON_TOKEN(Colon))
|
||||
CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructFieldUnknown, 0,
|
||||
CARBON_IF_ERROR(CARBON_ANY_TOKEN))
|
||||
CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructComma, 0, CARBON_TOKEN(Comma))
|
||||
CARBON_PARSE_NODE_KIND_BRACKET(StructLiteral,
|
||||
StructLiteralOrStructTypeLiteralStart,
|
||||
|
||||
Reference in new issue
Block a user