mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 20:28:12 +00:00
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:
1 parent
a5912b8b82
commit
f83518bfd7
12 files changed
+12
-28
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user