Align on FileStart/FileEnd for naming. (#3428)

The lexer has been using EndOfFile form (stemming from EOF), parser went
to FileEnd form. This consolidates on FileEnd form.
This commit is contained in:
Jon Ross-Perkins
2023-11-29 16:36:57 +00:00
committed by GitHub
parent 239f8030a4
commit 3f208e27f9
28 changed files with 147 additions and 149 deletions
@@ -28,7 +28,7 @@ static auto HandleDeclNameAndParams(Context& context, State after_name)
"`{0}` introducer should be followed by a name.",
Lex::TokenKind);
Lex::Token location = *context.position();
if (context.tokens().GetKind(location) == Lex::TokenKind::EndOfFile) {
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.
location = state.token;