Add parsing of default value exprs in pattern lists (#7631)

Adds parsing support only for default value expressions in pattern
lists, including leaving the default value unspecified with an
underscore `_`.

Per #7521.
This commit is contained in:
Lucile Rose Nihlen
2026-09-01 01:19:13 +00:00
committed by GitHub
parent 742684635a
commit 91c1e1049d
10 changed files with 319 additions and 83 deletions
+10
View File
@@ -151,4 +151,14 @@ auto HandleParseNode(Context& context, Parse::PatternListCommaId /*node_id*/)
return true;
}
auto HandleParseNode(Context& context, Parse::DefaultValueUnspecifiedId node_id)
-> bool {
return context.TODO(node_id, "pattern default values");
}
auto HandleParseNode(Context& context, Parse::DefaultValuePatternId node_id)
-> bool {
return context.TODO(node_id, "pattern default values");
}
} // namespace Carbon::Check