Don't create two parse nodes for each => token. (#7894)

Instead of producing two parse nodes in a row for each `=>` token,
produce just one.

Assisted-by: Gemini via Antigravity
This commit is contained in:
Richard Smith authored and GitHub committed 2026-10-06 21:43:36 +00:00
1 parent a5912b8b82
commit f83518bfd7
12 files changed
+12 -28

No files matched your search

+3 -5
View File
@@ -133,6 +133,9 @@ auto HandleParseNode(Context& context, Parse::LambdaDefinitionStartId node_id)
}
auto HandleParseNode(Context& context, Parse::LambdaId node_id) -> bool {
if (context.node_stack().PeekIs(Parse::NodeCategory::Expr)) {
return context.TODO(node_id, "terse lambda body");
}
auto function_id =
context.node_stack().Pop<Parse::NodeKind::LambdaDefinitionStart>();
CheckFunctionReturnOnFinish(context, node_id, function_id);
@@ -143,9 +146,4 @@ auto HandleParseNode(Context& context, Parse::LambdaId node_id) -> bool {
return true;
}
auto HandleParseNode(Context& context, Parse::TerseBodyArrowId node_id)
-> bool {
return context.TODO(node_id, "HandleTerseBodyArrow");
}
} // namespace Carbon::Check