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 authored and GitHub committed 2026-09-01 01:19:13 +00:00
1 parent 742684635a
commit 91c1e1049d
10 files changed
+319 -83

No files matched your search

+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