mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user