Parse support for simple friend declarations (#7889)

This change only supports `friend` with an identifier operand, because
there are a lot of open questions about the desired syntax beyond that.
This commit is contained in:
Geoff Romer authored and GitHub committed 2026-10-05 17:30:29 +00:00
1 parent d31a8b67d3
commit 8f258eaaa6
9 files changed
+208

No files matched your search

@@ -123,6 +123,8 @@ static constexpr auto DeclIntroducers = [] {
set(Lex::TokenKind::Export, NodeKind::ExportIntroducer,
StateKind::ExportName);
// TODO: Treat `extend` as a declaration introducer.
set(Lex::TokenKind::Friend, NodeKind::FriendIntroducer,
StateKind::FriendDecl);
set(Lex::TokenKind::Fn, NodeKind::FunctionIntroducer,
StateKind::FunctionIntroducer);
set(Lex::TokenKind::Impl, NodeKind::ImplIntroducer,