Rename Lex::{Token,Line} -> Lex::{Token,Line}Index. (#3433)

As discussed [on
discord](https://discord.com/channels/655572317891461132/655578254970716160/1178878128714678282)
and today's toolchain discussion.
This commit is contained in:
Richard Smith
2023-11-29 20:33:58 +00:00
committed by GitHub
parent 332a368cee
commit eae630a3db
16 changed files with 182 additions and 171 deletions
@@ -27,7 +27,7 @@ static auto HandleDeclNameAndParams(Context& context, State after_name)
CARBON_DIAGNOSTIC(ExpectedDeclName, Error,
"`{0}` introducer should be followed by a name.",
Lex::TokenKind);
Lex::Token location = *context.position();
Lex::TokenIndex location = *context.position();
if (context.tokens().GetKind(location) == Lex::TokenKind::FileEnd) {
// The end of file is often an especially unhelpful location. If that's
// the best we can do here, back up the location to the introducer itself.