mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
co-authored by
Richard Smith
parent
b36f85c2a5
commit
43ffd721a4
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user