Subexpr -> SubExpr (#3383)

This commit is contained in:
josh11b
2023-11-10 20:48:46 +00:00
committed by GitHub
parent 4aa6a6894d
commit b953fbf314
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ CARBON_DIAGNOSTIC_KIND(ExpectedVarAfterReturned)
CARBON_DIAGNOSTIC_KIND(ExpectedVariableDecl)
CARBON_DIAGNOSTIC_KIND(ExpectedVariableName)
CARBON_DIAGNOSTIC_KIND(OperatorRequiresParentheses)
CARBON_DIAGNOSTIC_KIND(StatementOperatorAsSubexpr)
CARBON_DIAGNOSTIC_KIND(StatementOperatorAsSubExpr)
CARBON_DIAGNOSTIC_KIND(UnaryOperatorRequiresParentheses)
CARBON_DIAGNOSTIC_KIND(UnaryOperatorHasWhitespace)
CARBON_DIAGNOSTIC_KIND(UnaryOperatorRequiresWhitespace)
+5 -5
View File
@@ -6,11 +6,11 @@
namespace Carbon::Parse {
static auto DiagnoseStatementOperatorAsSubexpr(Context& context) -> void {
CARBON_DIAGNOSTIC(StatementOperatorAsSubexpr, Error,
static auto DiagnoseStatementOperatorAsSubExpr(Context& context) -> void {
CARBON_DIAGNOSTIC(StatementOperatorAsSubExpr, Error,
"Operator `{0}` can only be used as a complete statement.",
Lex::TokenKind);
context.emitter().Emit(*context.position(), StatementOperatorAsSubexpr,
context.emitter().Emit(*context.position(), StatementOperatorAsSubExpr,
context.PositionKind());
}
@@ -37,7 +37,7 @@ auto HandleExpr(Context& context) -> void {
context.PositionKind());
} else {
// This operator wouldn't be allowed even if parenthesized.
DiagnoseStatementOperatorAsSubexpr(context);
DiagnoseStatementOperatorAsSubExpr(context);
}
} else {
// Check that this operator follows the proper whitespace rules.
@@ -210,7 +210,7 @@ auto HandleExprLoop(Context& context) -> void {
context.emitter().Emit(*context.position(), OperatorRequiresParentheses);
} else {
// This operator wouldn't be allowed even if parenthesized.
DiagnoseStatementOperatorAsSubexpr(context);
DiagnoseStatementOperatorAsSubExpr(context);
}
state.has_error = true;
} else {