Skip to content

Commit 8e6ce86

Browse files
committed
Formatting
1 parent 1b18fdb commit 8e6ce86

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

Sources/SwiftParser/Lexer/Cursor.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ extension Lexer {
242242

243243
/// If we have already lexed a token, the kind of the previously lexed token
244244
var previousTokenKind: RawTokenKind?
245-
245+
246246
/// If we have already lexed a token, stores whether the previous lexeme‘s ending contains a newline.
247247
var previousLexemeTrailingNewlinePresence: NewlinePresence?
248248

@@ -439,21 +439,21 @@ extension Lexer.Cursor {
439439
case .inRegexLiteral(let index, let lexemes):
440440
result = lexInRegexLiteral(lexemes.pointee[index...], existingPtr: lexemes)
441441
}
442-
442+
443443
var flags = result.flags
444444
if newlineInLeadingTrivia == .present {
445445
flags.insert(.isAtStartOfLine)
446446
}
447447
if let previousLexemeTrailingNewlinePresence, previousLexemeTrailingNewlinePresence == .present {
448448
flags.insert(.isAtStartOfLine)
449449
}
450-
450+
451451
self.previousLexemeTrailingNewlinePresence = result.newlinePresence
452452

453453
if let stateTransition = result.stateTransition {
454454
self.stateStack.perform(stateTransition: stateTransition, stateAllocator: stateAllocator)
455455
}
456-
456+
457457
// Trailing trivia.
458458
let trailingTriviaStart = self
459459
if let trailingTriviaMode = result.trailingTriviaLexingMode ?? currentState.trailingTriviaLexingMode(cursor: self) {

Tests/SwiftParserTest/StatementTests.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -763,23 +763,23 @@ final class StatementTests: XCTestCase {
763763
"""
764764
)
765765
}
766-
766+
767767
func testTrailingTriviaIncludesNewline() {
768768
assertParse(
769-
"""
770-
let a = 2/*
771-
*/let b = 3
772-
"""
769+
"""
770+
let a = 2/*
771+
*/let b = 3
772+
"""
773773
)
774-
774+
775775
assertParse(
776-
"""
777-
let a = 2/*
778-
779-
780-
781-
*/let b = 3
782-
"""
776+
"""
777+
let a = 2/*
778+
779+
780+
781+
*/let b = 3
782+
"""
783783
)
784784
}
785785
}

0 commit comments

Comments
 (0)