Skip to content

Commit 76d9e28

Browse files
committed
Format using swift format
1 parent f13b4bc commit 76d9e28

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TokenKindFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ let tokenKindFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
7979
}
8080
}
8181
}
82-
82+
8383
SwitchCaseSyntax("default:") {
8484
StmtSyntax(#"return """#)
8585
}

Sources/SwiftParser/Parser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ extension Parser {
266266

267267
var unexpectedTokens = [RawTokenSyntax]()
268268
var loopProgress = LoopProgressCondition()
269-
while !self.at(.eof), !currentToken.isAtStartOfLine, loopProgress.evaluate(self.currentToken) {
269+
while !self.at(.endOfFile), !currentToken.isAtStartOfLine, loopProgress.evaluate(self.currentToken) {
270270
unexpectedTokens += [self.consumeAnyToken()]
271271
}
272272

Sources/SwiftParser/StringLiterals.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,9 @@ extension Parser {
503503
// This allows us to skip over extraneous identifiers etc. in an unterminated string interpolation.
504504
var unexpectedBeforeRightParen: [RawTokenSyntax] = []
505505
var unexpectedProgress = LoopProgressCondition()
506-
while !self.at(.rightParen, .stringSegment, .backslash) && !self.at(TokenSpec(openQuoteKind), .endOfFile) && unexpectedProgress.evaluate(self.currentToken) {
506+
while !self.at(.rightParen, .stringSegment, .backslash) && !self.at(TokenSpec(openQuoteKind), .endOfFile)
507+
&& unexpectedProgress.evaluate(self.currentToken)
508+
{
507509
unexpectedBeforeRightParen.append(self.consumeAnyToken())
508510
}
509511
// Consume the right paren if present, ensuring that it's on the same

Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public extension TokenKind {
5151
static var rightSquareBracket: TokenKind {
5252
return .rightSquare
5353
}
54-
54+
5555
@available(*, deprecated, renamed: "endOfFile")
5656
static var eof: TokenKind { .endOfFile }
5757
}
@@ -82,7 +82,7 @@ public extension TokenSyntax {
8282
presence: presence
8383
)
8484
}
85-
85+
8686
@available(*, deprecated, renamed: "endOfFileToken")
8787
static func eof(
8888
leadingTrivia: Trivia = [],

0 commit comments

Comments
 (0)