Parse match_first blocks (#7478)

`match_first` is a declaration followed by a curly-brace block of
declarations.

The check phase will ensure only impl decls (or defns) are inside the
block.
This commit is contained in:
Dana Jansens
2026-07-09 15:34:52 +00:00
committed by GitHub
parent bb0d74ba39
commit 11901b1a59
10 changed files with 267 additions and 0 deletions
@@ -129,6 +129,8 @@ static constexpr auto DeclIntroducers = [] {
StateKind::ImplAfterIntroducer);
set(Lex::TokenKind::Interface, NodeKind::InterfaceIntroducer,
StateKind::TypeAfterIntroducerAsInterface);
set(Lex::TokenKind::MatchFirst, NodeKind::MatchFirstIntroducer,
StateKind::MatchFirst);
set(Lex::TokenKind::Namespace, NodeKind::NamespaceStart,
StateKind::Namespace);
set(Lex::TokenKind::Observe, NodeKind::ObserveIntroducer,