Support ref tags on arguments to ref params (#6312)

The issue of whether/how to include `ref` tags in the textual and
in-memory SemIR (see discussion
[here](https://discord.com/channels/655572317891461132/655578254970716160/1431316355742961805))
is left as future work.

---------

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
Geoff Romer
2025-11-11 20:30:19 +00:00
committed by GitHub
co-authored by Richard Smith
parent b36f85c2a5
commit 43ffd721a4
39 changed files with 798 additions and 337 deletions
+5
View File
@@ -133,6 +133,11 @@ static auto HandleBraceExprParamAfterDesignator(Context& context,
// that one has a `:` separator and the other has an `=` separator.
state.token = context.Consume();
context.PushState(state, param_finish_kind);
if (param_finish_kind == StateKind::BraceExprParamFinishAsValue &&
context.PositionIs(Lex::TokenKind::Ref)) {
context.PushState(StateKind::RefTagFinishAsRegular);
context.ConsumeChecked(Lex::TokenKind::Ref);
}
context.PushState(StateKind::Expr);
}