mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user