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:
Jon Ross-Perkins
2023-12-12 00:43:04 +00:00
committed by GitHub
parent 032c0e017b
commit 6cc5dc7736
19 changed files with 22 additions and 29 deletions
+2 -2
View File
@@ -147,7 +147,7 @@ static auto HandleBraceExprParamFinish(Context& context, NodeKind node_kind,
auto state = context.PopState();
if (state.has_error) {
context.AddLeafNode(NodeKind::StructFieldUnknown, state.token,
context.AddLeafNode(NodeKind::InvalidParse, state.token,
/*has_error=*/true);
} else {
context.AddNode(node_kind, state.token, state.subtree_start,
@@ -172,7 +172,7 @@ auto HandleBraceExprParamFinishAsValue(Context& context) -> void {
}
auto HandleBraceExprParamFinishAsUnknown(Context& context) -> void {
HandleBraceExprParamFinish(context, NodeKind::StructFieldUnknown,
HandleBraceExprParamFinish(context, NodeKind::InvalidParse,
State::BraceExprParamAsUnknown);
}