Skip to content

Commit 46dc365

Browse files
committed
[Gardening] Typo and indentation fixes
1 parent e505d41 commit 46dc365

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

include/swift/Parse/SyntaxParsingContext.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ class alignas(1 << SyntaxAlignInBits) SyntaxParsingContext {
331331
/// are supported. See the implementation.
332332
void createNodeInPlace(SyntaxKind Kind);
333333

334-
/// Squshing nodes from the back of the pending syntax list to a given syntax
335-
/// collection kind. If there're no nodes can fit into the collection kind,
334+
/// Squashing nodes from the back of the pending syntax list to a given syntax
335+
/// collection kind. If there're no nodes that can fit into the collection kind,
336336
/// this function does nothing. Otherwise, it creates a collection node in place
337337
/// to contain all sequential suitable nodes from back.
338338
void collectNodesInPlace(SyntaxKind ColletionKind);

lib/Parse/ParseDecl.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6465,28 +6465,28 @@ Parser::parseDeclOperator(ParseDeclOptions Flags, DeclAttributes &Attributes) {
64656465
}
64666466

64676467
DebuggerContextChange DCC (*this);
6468-
6468+
64696469
Identifier Name = Context.getIdentifier(Tok.getText());
64706470
SourceLoc NameLoc = consumeToken();
6471-
6471+
64726472
if (Attributes.hasAttribute<PostfixAttr>()) {
64736473
if (!Name.empty() && (Name.get()[0] == '?' || Name.get()[0] == '!'))
64746474
diagnose(NameLoc, diag::expected_operator_name_after_operator);
64756475
}
6476-
6476+
64776477
auto Result = parseDeclOperatorImpl(OperatorLoc, Name, NameLoc, Attributes);
64786478

64796479
if (!DCC.movedToTopLevel() && !AllowTopLevel) {
64806480
diagnose(OperatorLoc, diag::operator_decl_inner_scope);
64816481
return nullptr;
64826482
}
6483-
6483+
64846484
return DCC.fixupParserResult(Result);
64856485
}
64866486

64876487
ParserResult<OperatorDecl>
64886488
Parser::parseDeclOperatorImpl(SourceLoc OperatorLoc, Identifier Name,
6489-
SourceLoc NameLoc, DeclAttributes &Attributes) {
6489+
SourceLoc NameLoc, DeclAttributes &Attributes) {
64906490
bool isPrefix = Attributes.hasAttribute<PrefixAttr>();
64916491
bool isInfix = Attributes.hasAttribute<InfixAttr>();
64926492
bool isPostfix = Attributes.hasAttribute<PostfixAttr>();
@@ -6540,7 +6540,7 @@ Parser::parseDeclOperatorImpl(SourceLoc OperatorLoc, Identifier Name,
65406540
consumeToken();
65416541
}
65426542
}
6543-
6543+
65446544
// Diagnose deprecated operator body syntax `operator + { ... }`.
65456545
SourceLoc lBraceLoc;
65466546
if (consumeIf(tok::l_brace, lBraceLoc)) {
@@ -6562,7 +6562,7 @@ Parser::parseDeclOperatorImpl(SourceLoc OperatorLoc, Identifier Name,
65626562
skipUntilDeclRBrace();
65636563
(void) consumeIf(tok::r_brace);
65646564
}
6565-
6565+
65666566
OperatorDecl *res;
65676567
if (Attributes.hasAttribute<PrefixAttr>())
65686568
res = new (Context)
@@ -6579,7 +6579,7 @@ Parser::parseDeclOperatorImpl(SourceLoc OperatorLoc, Identifier Name,
65796579
secondIdentifierName, secondIdentifierNameLoc);
65806580

65816581
diagnoseOperatorFixityAttributes(*this, Attributes, res);
6582-
6582+
65836583
res->getAttrs() = Attributes;
65846584
return makeParserResult(res);
65856585
}
@@ -6599,7 +6599,7 @@ Parser::parseDeclPrecedenceGroup(ParseDeclOptions flags,
65996599
Identifier name;
66006600
SourceLoc nameLoc;
66016601
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
66036603
// skip the entire body.
66046604
if (consumeIf(tok::l_brace)) {
66056605
skipUntilDeclRBrace();
@@ -6809,7 +6809,7 @@ Parser::parseDeclPrecedenceGroup(ParseDeclOptions flags,
68096809
SyntaxContext->collectNodesInPlace(SyntaxKind::PrecedenceGroupNameList);
68106810
continue;
68116811
}
6812-
6812+
68136813
diagnose(Tok, diag::unknown_precedencegroup_attribute, attrName);
68146814
return abortBody();
68156815
}

0 commit comments

Comments
 (0)