Skip to content

Commit 4721852

Browse files
authored
Spelling parse (#42469)
* spelling: appear Signed-off-by: Josh Soref <[email protected]> * spelling: availability Signed-off-by: Josh Soref <[email protected]> * spelling: available Signed-off-by: Josh Soref <[email protected]> * spelling: coerce Signed-off-by: Josh Soref <[email protected]> * spelling: collection Signed-off-by: Josh Soref <[email protected]> * spelling: condition Signed-off-by: Josh Soref <[email protected]> * spelling: conditional Signed-off-by: Josh Soref <[email protected]> * spelling: delimiter Signed-off-by: Josh Soref <[email protected]> * spelling: derived Signed-off-by: Josh Soref <[email protected]> * spelling: diagnostics Signed-off-by: Josh Soref <[email protected]> * spelling: disambiguation Signed-off-by: Josh Soref <[email protected]> * spelling: dropped Signed-off-by: Josh Soref <[email protected]> * spelling: escaped Signed-off-by: Josh Soref <[email protected]> * spelling: existence Signed-off-by: Josh Soref <[email protected]> * spelling: expression Signed-off-by: Josh Soref <[email protected]> * spelling: expressions Signed-off-by: Josh Soref <[email protected]> * spelling: extended Signed-off-by: Josh Soref <[email protected]> * spelling: furthermore Signed-off-by: Josh Soref <[email protected]> * spelling: identifier Signed-off-by: Josh Soref <[email protected]> * spelling: indentation Signed-off-by: Josh Soref <[email protected]> * spelling: inspect Signed-off-by: Josh Soref <[email protected]> * spelling: miscellaneous Signed-off-by: Josh Soref <[email protected]> * spelling: multiline Signed-off-by: Josh Soref <[email protected]> * spelling: offset Signed-off-by: Josh Soref <[email protected]> * spelling: passthrough Signed-off-by: Josh Soref <[email protected]> * spelling: precede Signed-off-by: Josh Soref <[email protected]> * spelling: prefix Signed-off-by: Josh Soref <[email protected]> * spelling: receiver Signed-off-by: Josh Soref <[email protected]> * spelling: reference Signed-off-by: Josh Soref <[email protected]> * spelling: registered Signed-off-by: Josh Soref <[email protected]> * spelling: representing Signed-off-by: Josh Soref <[email protected]> * spelling: returned Signed-off-by: Josh Soref <[email protected]> * spelling: sequence Signed-off-by: Josh Soref <[email protected]> * spelling: should Signed-off-by: Josh Soref <[email protected]> * spelling: successfully Signed-off-by: Josh Soref <[email protected]> * spelling: that Signed-off-by: Josh Soref <[email protected]> * spelling: the Signed-off-by: Josh Soref <[email protected]> * spelling: trivia Signed-off-by: Josh Soref <[email protected]> * spelling: unsupported Signed-off-by: Josh Soref <[email protected]> * spelling: whitespace Signed-off-by: Josh Soref <[email protected]> Co-authored-by: Josh Soref <[email protected]>
1 parent 3d488f6 commit 4721852

28 files changed

+65
-65
lines changed

include/swift/Parse/CodeCompletionCallbacks.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class CodeCompletionCallbacks {
128128
/// by user.
129129
virtual void completePostfixExprBeginning(CodeCompletionExpr *E) {};
130130

131-
/// Complete the beginning of expr-postfix in a for-each loop sequqence
131+
/// Complete the beginning of expr-postfix in a for-each loop sequence
132132
/// -- no tokens provided by user.
133133
virtual void completeForEachSequenceBeginning(CodeCompletionExpr *E) {};
134134

@@ -212,7 +212,7 @@ class CodeCompletionCallbacks {
212212

213213
/// Complete a yield statement. A missing yield index means that the
214214
/// completion immediately follows the 'yield' keyword; it may be either
215-
/// an expresion or a parenthesized expression list. A present yield
215+
/// an expression or a parenthesized expression list. A present yield
216216
/// index means that the completion is within the parentheses and is
217217
/// for a specific yield value.
218218
virtual void completeYieldStmt(CodeCompletionExpr *E,

include/swift/Parse/Lexer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class Lexer {
231231
}
232232

233233
/// Lex a token. If \c TriviaRetentionMode is \c WithTrivia, passed pointers
234-
/// to trivias are populated.
234+
/// to trivia are populated.
235235
void lex(Token &Result, StringRef &LeadingTriviaResult,
236236
StringRef &TrailingTriviaResult) {
237237
Result = NextToken;
@@ -423,7 +423,7 @@ class Lexer {
423423
/// source location.
424424
///
425425
/// If \c ExtraIndentation is not null, it will be set to an appropriate
426-
/// additional intendation for adding code in a smaller scope "within" \c Loc.
426+
/// additional indentation for adding code in a smaller scope "within" \c Loc.
427427
static StringRef getIndentationForLine(SourceManager &SM, SourceLoc Loc,
428428
StringRef *ExtraIndentation = nullptr);
429429

@@ -661,7 +661,7 @@ class Lexer {
661661
/// A lexer that can lex trivia into its pieces
662662
class TriviaLexer {
663663
public:
664-
/// Decompose the triva in \p TriviaStr into their pieces.
664+
/// Decompose the trivia in \p TriviaStr into their pieces.
665665
static ParsedTrivia lexTrivia(StringRef TriviaStr);
666666
};
667667

include/swift/Parse/ParsedRawSyntaxNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class ParsedRawSyntaxNode {
152152
/// must be interpreted by the \c SyntaxParseAction, which likely also needs
153153
/// the node type (layout or token) to interpret the data.
154154
/// The data opaque data returned by this function *must not* be used to
155-
/// record the node, only to insepect it.
155+
/// record the node, only to inspect it.
156156
OpaqueSyntaxNode getUnsafeDeferredOpaqueData() const {
157157
assert(isDeferredLayout() || isDeferredToken());
158158
return Data.getOpaque();

include/swift/Parse/ParsedRawSyntaxRecorder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class ParsedRawSyntaxRecorder final {
159159
/*IsMissing=*/false, range);
160160
}
161161

162-
/// Record a raw syntax collecton without eny elements. \p loc can be invalid
162+
/// Record a raw syntax collection without eny elements. \p loc can be invalid
163163
/// or an approximate location of where an element of the collection would be
164164
/// if not missing.
165165
ParsedRawSyntaxNode recordEmptyRawSyntaxCollection(syntax::SyntaxKind kind,

include/swift/Parse/Parser.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ class Parser {
477477
savedConsumer(receiver, this) {}
478478
void receive(const Token &tok) override { delayedTokens.push_back(tok); }
479479
Optional<std::vector<Token>> finalize() override {
480-
llvm_unreachable("Cannot finalize a DelayedTokenReciever");
480+
llvm_unreachable("Cannot finalize a DelayedTokenReceiver");
481481
}
482482
~DelayedTokenReceiver() {
483483
if (!shouldTransfer)
@@ -901,7 +901,7 @@ class Parser {
901901
/// When encountering an error or a missing matching token (e.g. '}'), return
902902
/// the location to use for it. This value should be at the last token in
903903
/// the ASTNode being parsed so that it nests within any enclosing nodes, and,
904-
/// for ASTScope lookups, it does not preceed any identifiers to be looked up.
904+
/// for ASTScope lookups, it does not precede any identifiers to be looked up.
905905
/// However, the latter case does not hold when parsing an interpolated
906906
/// string literal because there may be identifiers to be looked up in the
907907
/// literal and their locations will not precede the location of a missing
@@ -1704,7 +1704,7 @@ class Parser {
17041704
/// \param inLoc The location of the 'in' keyword, if present.
17051705
///
17061706
/// \returns ParserStatus error if an error occurred. Success if no signature
1707-
/// is present or succssfully parsed.
1707+
/// is present or successfully parsed.
17081708
ParserStatus parseClosureSignatureIfPresent(
17091709
DeclAttributes &attributes,
17101710
SourceRange &bracketRange,
@@ -1982,7 +1982,7 @@ DeclName formDeclName(ASTContext &ctx,
19821982
bool isInitializer,
19831983
bool isSubscript = false);
19841984

1985-
/// Form a Swift declaration name referemce from its constituent parts.
1985+
/// Form a Swift declaration name reference from its constituent parts.
19861986
DeclNameRef formDeclNameRef(ASTContext &ctx,
19871987
StringRef baseName,
19881988
ArrayRef<StringRef> argumentLabels,

include/swift/Parse/ParserResult.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class ParserStatus {
168168
}
169169

170170
/// Return true if either 1) no errors were encountered while parsing this,
171-
/// or 2) there were errors but the the parser already recovered from them.
171+
/// or 2) there were errors but the parser already recovered from them.
172172
bool isSuccess() const { return !isError(); }
173173
bool isErrorOrHasCompletion() const { return IsError || IsCodeCompletion; }
174174

include/swift/Parse/SyntaxParseActions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ class SyntaxParseActions {
138138
/// retrieved using \c getDeferredChildRange if element ranges should be
139139
/// verified
140140
/// \p node is the parent node for which the child at position \p ChildIndex
141-
/// should be retrieved. Furthmore, \p node starts at \p StartLoc.
141+
/// should be retrieved. Furthermore, \p node starts at \p StartLoc.
142142
virtual DeferredNodeInfo getDeferredChild(OpaqueSyntaxNode node,
143143
size_t childIndex) const = 0;
144144

145145
/// To verify \c ParsedRawSyntaxNode element ranges, the range of child nodes
146-
/// returend by \c getDeferredChild needs to be determined. That's what this
146+
/// returned by \c getDeferredChild needs to be determined. That's what this
147147
/// method does.
148148
/// It assumes that \p node is a deferred layout node starting at \p startLoc
149149
/// and returns the range of the child node at \p childIndex.

include/swift/Parse/SyntaxParsingContext.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ class alignas(1 << SyntaxAlignInBits) SyntaxParsingContext {
116116
/// Indicates what action should be performed on the destruction of
117117
/// SyntaxParsingContext
118118
enum class AccumulationMode {
119-
// Coerece the result to one of ContextKind.
120-
// E.g. for ContextKind::Expr, passthroug if the result is CallExpr, whereas
119+
// Coerce the result to one of ContextKind.
120+
// E.g. for ContextKind::Expr, passthrough if the result is CallExpr, whereas
121121
// <UnknownExpr><SomeDecl /></UnknownDecl> for non Exprs.
122122
CoerceKind,
123123

@@ -154,7 +154,7 @@ class alignas(1 << SyntaxAlignInBits) SyntaxParsingContext {
154154

155155
RootContextData *RootData;
156156

157-
// Offet for 'Storage' this context owns from.
157+
// Offset for 'Storage' this context owns from.
158158
const size_t Offset;
159159

160160
// Operation on destruction.
@@ -304,7 +304,7 @@ class alignas(1 << SyntaxAlignInBits) SyntaxParsingContext {
304304
/// collection kind. If there're no nodes that can fit into the collection kind,
305305
/// this function does nothing. Otherwise, it creates a collection node in place
306306
/// to contain all sequential suitable nodes from back.
307-
void collectNodesInPlace(SyntaxKind ColletionKind,
307+
void collectNodesInPlace(SyntaxKind CollectionKind,
308308
SyntaxNodeCreationKind nodeCreateK = SyntaxNodeCreationKind::Recorded);
309309

310310
/// On destruction, construct a specified kind of syntax node consuming the

lib/Parse/Lexer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void Lexer::initialize(unsigned Offset, unsigned EndOffset) {
205205
// Check for Unicode BOM at start of file (Only UTF-8 BOM supported now).
206206
size_t BOMLength = contents.startswith("\xEF\xBB\xBF") ? 3 : 0;
207207

208-
// Keep information about existance of UTF-8 BOM for transparency source code
208+
// Keep information about existence of UTF-8 BOM for transparency source code
209209
// editing with libSyntax.
210210
ContentStart = BufferStart + BOMLength;
211211

@@ -1359,7 +1359,7 @@ unsigned Lexer::lexCharacter(const char *&CurPtr, char StopQuote,
13591359
case '"':
13601360
case '\'':
13611361
if (CurPtr[-1] == StopQuote) {
1362-
// Mutliline and custom escaping are only enabled for " quote.
1362+
// Multiline and custom escaping are only enabled for " quote.
13631363
if (LLVM_UNLIKELY(StopQuote != '"'))
13641364
return ~0U;
13651365
if (!IsMultilineString && !CustomDelimiterLen)
@@ -1908,7 +1908,7 @@ void Lexer::lexStringLiteral(unsigned CustomDelimiterLen) {
19081908

19091909
if (QuoteChar == '\'') {
19101910
assert(!IsMultilineString && CustomDelimiterLen == 0 &&
1911-
"Single quoted string cannot have custom delimitor, nor multiline");
1911+
"Single quoted string cannot have custom delimiter, nor multiline");
19121912
diagnoseSingleQuoteStringLiteral(TokStart, CurPtr);
19131913
}
19141914

@@ -2722,7 +2722,7 @@ StringRef Lexer::lexTrivia(bool IsForTrailingTrivia,
27222722
goto Restart;
27232723
case '/':
27242724
if (IsForTrailingTrivia || isKeepingComments()) {
2725-
// Don't lex comments as trailing trivias (for now).
2725+
// Don't lex comments as trailing trivia (for now).
27262726
// Don't try to lex comments here if we are lexing comments as Tokens.
27272727
break;
27282728
} else if (*CurPtr == '/') {

lib/Parse/ParseDecl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ void Parser::parseAllAvailabilityMacroArguments() {
17161716
// The sub-parser is not actually parsing the source file but the LangOpts
17171717
// AvailabilityMacros. No point creating a libSyntax tree for it. In fact, the
17181718
// creation of a libSyntax tree would always fail because the
1719-
// AvailibilityMacro is not valid Swift source code.
1719+
// AvailabilityMacro is not valid Swift source code.
17201720
LangOpts.BuildSyntaxTree = false;
17211721

17221722
for (StringRef macro: LangOpts.AvailabilityMacros) {
@@ -2921,7 +2921,7 @@ bool Parser::parseNewDeclAttribute(DeclAttributes &Attributes, SourceLoc AtLoc,
29212921
StringRef message;
29222922
if (consumeIf(tok::l_paren)) {
29232923
if (!Tok.is(tok::identifier)) {
2924-
llvm_unreachable("Flag must start with an indentifier");
2924+
llvm_unreachable("Flag must start with an identifier");
29252925
}
29262926

29272927
StringRef flag = Tok.getText();
@@ -6343,7 +6343,7 @@ static bool parseAccessorIntroducer(Parser &P,
63436343
/// \endverbatim
63446344
///
63456345
/// While only 'get' accessors currently support such specifiers,
6346-
/// this routine will also diagnose unspported effects specifiers on
6346+
/// this routine will also diagnose unsupported effects specifiers on
63476347
/// other accessors.
63486348
///
63496349
/// \param accessors the accessors we've parsed already.

lib/Parse/ParseExpr.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ ParserResult<Expr> Parser::parseExprArrow() {
177177
ParserResult<Expr> Parser::parseExprSequence(Diag<> Message,
178178
bool isExprBasic,
179179
bool isForConditionalDirective) {
180-
SyntaxParsingContext ExprSequnceContext(SyntaxContext, SyntaxContextKind::Expr);
180+
SyntaxParsingContext ExprSequenceContext(SyntaxContext, SyntaxContextKind::Expr);
181181

182182
SmallVector<Expr*, 8> SequencedExprs;
183183
SourceLoc startLoc = Tok.getLoc();
@@ -380,8 +380,8 @@ ParserResult<Expr> Parser::parseExprSequence(Diag<> Message,
380380
if (SequencedExprs.size() == 1)
381381
return makeParserResult(SequenceStatus, SequencedExprs[0]);
382382

383-
ExprSequnceContext.createNodeInPlace(SyntaxKind::ExprList);
384-
ExprSequnceContext.setCreateSyntax(SyntaxKind::SequenceExpr);
383+
ExprSequenceContext.createNodeInPlace(SyntaxKind::ExprList);
384+
ExprSequenceContext.setCreateSyntax(SyntaxKind::SequenceExpr);
385385
return makeParserResult(SequenceStatus,
386386
SequenceExpr::create(Context, SequencedExprs));
387387
}
@@ -583,7 +583,7 @@ ParserResult<Expr> Parser::parseExprUnary(Diag<> Message, bool isExprBasic) {
583583
if (SubExpr.isNull())
584584
return Status;
585585

586-
// We are sure we can create a prefix prefix operator expr now.
586+
// We are sure we can create a prefix operator expr now.
587587
UnaryContext.setCreateSyntax(SyntaxKind::PrefixOperatorExpr);
588588

589589
// Check if we have a unary '-' with number literal sub-expression, for
@@ -3503,7 +3503,7 @@ ParserResult<Expr> Parser::parseExprPoundUnknown(SourceLoc LSquareLoc) {
35033503
/// Handle code completion after pound in expression position.
35043504
///
35053505
/// In case it's in a stmt condition position, specify \p ParentKind to
3506-
/// decide the position accepts #available(...) condtion.
3506+
/// decide the position accepts #available(...) condition.
35073507
///
35083508
/// expr-pound-codecompletion:
35093509
/// '#' code-completion-token

lib/Parse/ParseIfConfig.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class ValidateIfConfigCondition :
153153
return UDRE->getName().getBaseIdentifier().str();
154154
}
155155

156-
/// True for expressions represeting either top level modules
156+
/// True for expressions representing either top level modules
157157
/// or nested submodules.
158158
bool isModulePath(Expr *E) {
159159
auto UDE = dyn_cast<UnresolvedDotExpr>(E);
@@ -807,8 +807,8 @@ ParserResult<IfConfigDecl> Parser::parseIfConfig(
807807
// We shouldn't skip code if we are building syntax tree.
808808
// The parser will keep running and we just discard the AST part.
809809
DiagnosticSuppression suppression(Context.Diags);
810-
SmallVector<ASTNode, 16> dropedElements;
811-
parseElements(dropedElements, false);
810+
SmallVector<ASTNode, 16> droppedElements;
811+
parseElements(droppedElements, false);
812812
} else {
813813
DiagnosticTransaction DT(Diags);
814814
skipUntilConditionalBlockClose();

lib/Parse/ParsePattern.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ Parser::parseFunctionArguments(SmallVectorImpl<Identifier> &NamePieces,
846846
status |= CurriedParameterClause;
847847
}
848848

849-
// If the decl uses currying syntax, complain that that syntax has gone away.
849+
// If the decl uses currying syntax, complain that syntax has gone away.
850850
if (MultipleParameterLists) {
851851
diagnose(BodyParams->getStartLoc(),
852852
diag::parameter_curry_syntax_removed);

lib/Parse/ParseRequests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ ParseMembersRequest::evaluate(Evaluator &evaluator,
7474

7575
unsigned bufferID = *sf->getBufferID();
7676

77-
// Lexer diaganostics have been emitted during skipping, so we disable lexer's
77+
// Lexer diagnostics have been emitted during skipping, so we disable lexer's
7878
// diagnostic engine here.
7979
Parser parser(bufferID, *sf, /*No Lexer Diags*/nullptr, nullptr, nullptr);
8080
// Disable libSyntax creation in the delayed parsing.

lib/Parse/ParseStmt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ bool Parser::isStartOfStmt() {
9494
consumeToken(tok::identifier);
9595
consumeToken(tok::colon);
9696

97-
// We treating IDENTIIFIER: { as start of statement to provide missed 'do'
97+
// We treating IDENTIFIER: { as start of statement to provide missed 'do'
9898
// diagnostics. This case will be handled in parseStmt().
9999
if (Tok.is(tok::l_brace)) {
100100
return true;
@@ -1273,7 +1273,7 @@ ParserResult<PoundAvailableInfo> Parser::parseStmtConditionPoundAvailable() {
12731273
isUnavailability = true;
12741274
}
12751275

1276-
SyntaxParsingContext ConditonCtxt(SyntaxContext, Kind);
1276+
SyntaxParsingContext ConditionCtxt(SyntaxContext, Kind);
12771277
SourceLoc PoundLoc;
12781278

12791279
PoundLoc = consumeToken(MainToken);

lib/Parse/Parser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ class TokenRecorder: public ConsumeTokenReceiver {
413413
// Token list ordered by their appearance in the source file.
414414
std::vector<Token> Tokens;
415415

416-
// Registered token kind change. These changes are regiestered before the
416+
// Registered token kind change. These changes are registered before the
417417
// token is consumed, so we need to keep track of them here.
418418
llvm::DenseMap<const void*, tok> TokenKindChangeMap;
419419

@@ -504,7 +504,7 @@ class TokenRecorder: public ConsumeTokenReceiver {
504504
return;
505505
}
506506

507-
// Update Token kind if a kind update was regiestered before.
507+
// Update Token kind if a kind update was registered before.
508508
auto Found = TokenKindChangeMap.find(Tok.getLoc().
509509
getOpaquePointerValue());
510510
if (Found != TokenKindChangeMap.end()) {
@@ -790,7 +790,7 @@ void Parser::skipListUntilDeclRBrace(SourceLoc startLoc, tok T1, tok T2) {
790790
consumeToken();
791791

792792
// If the following token is either <identifier> or :, it means that
793-
// this `var` or `let` shoud be interpreted as a label
793+
// this `var` or `let` should be interpreted as a label
794794
if ((Tok.canBeArgumentLabel() && peekToken().is(tok::colon)) ||
795795
peekToken().is(tok::colon)) {
796796
backtrack.cancelBacktrack();

lib/Parse/SyntaxParsingContext.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,21 +302,21 @@ void SyntaxParsingContext::createNodeInPlace(SyntaxKind Kind,
302302
}
303303
}
304304

305-
void SyntaxParsingContext::collectNodesInPlace(SyntaxKind ColletionKind,
305+
void SyntaxParsingContext::collectNodesInPlace(SyntaxKind CollectionKind,
306306
SyntaxNodeCreationKind nodeCreateK) {
307-
assert(isCollectionKind(ColletionKind));
307+
assert(isCollectionKind(CollectionKind));
308308
assert(isTopOfContextStack());
309309
if (!Enabled)
310310
return;
311311
auto Parts = getParts();
312312
auto Count = 0;
313313
for (auto I = Parts.rbegin(), End = Parts.rend(); I != End; ++I) {
314-
if (!SyntaxFactory::canServeAsCollectionMemberRaw(ColletionKind, I->getKind()))
314+
if (!SyntaxFactory::canServeAsCollectionMemberRaw(CollectionKind, I->getKind()))
315315
break;
316316
++Count;
317317
}
318318
if (Count)
319-
createNodeInPlace(ColletionKind, Count, nodeCreateK);
319+
createNodeInPlace(CollectionKind, Count, nodeCreateK);
320320
}
321321

322322
static ParsedRawSyntaxNode finalizeSourceFile(RootContextData &RootData,

test/AutoDiff/Parse/transpose_attr_parse.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ func transpose(v: Float) -> Float
7979
func transpose(v: Float) -> Float
8080

8181
// NOTE: The "expected ',' separator" diagnostic is not ideal.
82-
// Ideally, the diagnostic should point out that that `Swift.Float.+(_:_)` is
82+
// Ideally, the diagnostic should point out that `Swift.Float.+(_:_)` is
8383
// not a valid declaration name (missing colon after second argument label).
8484
// expected-error @+2 {{expected ',' separator}}
8585
// expected-error @+1 {{expected declaration}}
8686
@transpose(of: Swift.Float.+(_:_))
8787
func transpose(v: Float) -> Float
8888

8989
// NOTE: The "expected ',' separator" diagnostic is not ideal.
90-
// Ideally, the diagnostic should point out that that `Swift.Float.+.a` is
90+
// Ideally, the diagnostic should point out that `Swift.Float.+.a` is
9191
// not a valid declaration name.
9292
// expected-error @+2 {{expected ',' separator}}
9393
// expected-error @+1 {{expected declaration}}

test/Parse/ConditionalCompilation/toplevel_parseaslibrary.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-typecheck-verify-swift -parse-as-library -D FOO
22

3-
// '-parse-as-library' doesn't allow exprssions nor statements in #if blocks.
3+
// '-parse-as-library' doesn't allow expressions nor statements in #if blocks.
44

55
func foo() {}
66

test/Parse/availability_query_unavailability.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ if case 42 = 42, #available(macOS 10.51, *), #unavailable(macOS 10.52) { // expe
112112
if #available(macOS 10.51, *), case 42 = 42, #unavailable(macOS 10.52) { // expected-error {{#available and #unavailable cannot be in the same statement}}
113113
}
114114

115-
// Allow availabiility and unavailability to mix if they are not in the same statement.
115+
// Allow availability and unavailability to mix if they are not in the same statement.
116116
if #unavailable(macOS 11) {
117117
if #available(macOS 10, *) { }
118118
}

0 commit comments

Comments
 (0)