@@ -6465,28 +6465,28 @@ Parser::parseDeclOperator(ParseDeclOptions Flags, DeclAttributes &Attributes) {
6465
6465
}
6466
6466
6467
6467
DebuggerContextChange DCC (*this );
6468
-
6468
+
6469
6469
Identifier Name = Context.getIdentifier (Tok.getText ());
6470
6470
SourceLoc NameLoc = consumeToken ();
6471
-
6471
+
6472
6472
if (Attributes.hasAttribute <PostfixAttr>()) {
6473
6473
if (!Name.empty () && (Name.get ()[0 ] == ' ?' || Name.get ()[0 ] == ' !' ))
6474
6474
diagnose (NameLoc, diag::expected_operator_name_after_operator);
6475
6475
}
6476
-
6476
+
6477
6477
auto Result = parseDeclOperatorImpl (OperatorLoc, Name, NameLoc, Attributes);
6478
6478
6479
6479
if (!DCC.movedToTopLevel () && !AllowTopLevel) {
6480
6480
diagnose (OperatorLoc, diag::operator_decl_inner_scope);
6481
6481
return nullptr ;
6482
6482
}
6483
-
6483
+
6484
6484
return DCC.fixupParserResult (Result);
6485
6485
}
6486
6486
6487
6487
ParserResult<OperatorDecl>
6488
6488
Parser::parseDeclOperatorImpl (SourceLoc OperatorLoc, Identifier Name,
6489
- SourceLoc NameLoc, DeclAttributes &Attributes) {
6489
+ SourceLoc NameLoc, DeclAttributes &Attributes) {
6490
6490
bool isPrefix = Attributes.hasAttribute <PrefixAttr>();
6491
6491
bool isInfix = Attributes.hasAttribute <InfixAttr>();
6492
6492
bool isPostfix = Attributes.hasAttribute <PostfixAttr>();
@@ -6540,7 +6540,7 @@ Parser::parseDeclOperatorImpl(SourceLoc OperatorLoc, Identifier Name,
6540
6540
consumeToken ();
6541
6541
}
6542
6542
}
6543
-
6543
+
6544
6544
// Diagnose deprecated operator body syntax `operator + { ... }`.
6545
6545
SourceLoc lBraceLoc;
6546
6546
if (consumeIf (tok::l_brace, lBraceLoc)) {
@@ -6562,7 +6562,7 @@ Parser::parseDeclOperatorImpl(SourceLoc OperatorLoc, Identifier Name,
6562
6562
skipUntilDeclRBrace ();
6563
6563
(void ) consumeIf (tok::r_brace);
6564
6564
}
6565
-
6565
+
6566
6566
OperatorDecl *res;
6567
6567
if (Attributes.hasAttribute <PrefixAttr>())
6568
6568
res = new (Context)
@@ -6579,7 +6579,7 @@ Parser::parseDeclOperatorImpl(SourceLoc OperatorLoc, Identifier Name,
6579
6579
secondIdentifierName, secondIdentifierNameLoc);
6580
6580
6581
6581
diagnoseOperatorFixityAttributes (*this , Attributes, res);
6582
-
6582
+
6583
6583
res->getAttrs () = Attributes;
6584
6584
return makeParserResult (res);
6585
6585
}
@@ -6599,7 +6599,7 @@ Parser::parseDeclPrecedenceGroup(ParseDeclOptions flags,
6599
6599
Identifier name;
6600
6600
SourceLoc nameLoc;
6601
6601
if (parseIdentifier (name, nameLoc, diag::expected_precedencegroup_name)) {
6602
- // If the identifier is missing or a keyword or something, try to skip
6602
+ // If the identifier is missing or a keyword or something, try to
6603
6603
// skip the entire body.
6604
6604
if (consumeIf (tok::l_brace)) {
6605
6605
skipUntilDeclRBrace ();
@@ -6809,7 +6809,7 @@ Parser::parseDeclPrecedenceGroup(ParseDeclOptions flags,
6809
6809
SyntaxContext->collectNodesInPlace (SyntaxKind::PrecedenceGroupNameList);
6810
6810
continue ;
6811
6811
}
6812
-
6812
+
6813
6813
diagnose (Tok, diag::unknown_precedencegroup_attribute, attrName);
6814
6814
return abortBody ();
6815
6815
}
0 commit comments