Rename DotOrArrow to PeriodOrArrow (#4263)

We generally say Period (this is the only "Dot" in code), so this seems
more consistent.

Also renames a few struct tests that had "dot" in the name.
This commit is contained in:
Jon Ross-Perkins
2024-08-27 23:46:07 +00:00
committed by GitHub
parent bed5fdcbbe
commit dfe992f1bc
6 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -35,10 +35,10 @@ static auto HandlePeriodOrArrow(Context& context, NodeKind node_kind,
context.PushState(State::OnlyParenExpr);
return;
} else {
CARBON_DIAGNOSTIC(ExpectedIdentifierAfterDotOrArrow, Error,
CARBON_DIAGNOSTIC(ExpectedIdentifierAfterPeriodOrArrow, Error,
"Expected identifier after `{0}`.", llvm::StringLiteral);
context.emitter().Emit(
*context.position(), ExpectedIdentifierAfterDotOrArrow,
*context.position(), ExpectedIdentifierAfterPeriodOrArrow,
is_arrow ? llvm::StringLiteral("->") : llvm::StringLiteral("."));
// If we see a keyword, assume it was intended to be a name.
// TODO: Should keywords be valid here?