mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Convert TokenInfo::ResetAs... functions to return new TokenInfos. (#7252)
As requested in #7249.
This commit is contained in:
@@ -212,9 +212,8 @@ auto TokenizedBuffer::AddPostLexingRecoveryTokenAsIdentifier(TokenIndex token)
|
||||
CARBON_CHECK(kind != TokenKind::Identifier, "Recovery not required");
|
||||
|
||||
auto identifier_id = value_stores_->identifiers().Add(GetTokenText(token));
|
||||
auto info = token_infos_.Get(token);
|
||||
info.ResetAsErrorRecoveryIdentifier(identifier_id);
|
||||
return AddPostLexingRecoveryToken(info);
|
||||
return AddPostLexingRecoveryToken(
|
||||
token_infos_.Get(token).AsErrorRecoveryIdentifier(identifier_id));
|
||||
}
|
||||
|
||||
auto TokenizedBuffer::AddPostLexingRecoveryToken(TokenInfo info) -> TokenIndex {
|
||||
|
||||
Reference in New Issue
Block a user