Skip to content

Commit

Permalink
Increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
dfed committed Dec 30, 2024
1 parent 85321d5 commit 6bba48c
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ import SwiftSyntax

extension StringLiteralSegmentListSyntax {
public var firstStringSegment: String? {
guard let first else { return nil }
switch first {
case let .stringSegment(stringSegmentSyntax):
return stringSegmentSyntax.content.text
case .expressionSegment:
return nil
stringSegmentSyntax.content.text
case .expressionSegment, .none:
nil
}
}
}

0 comments on commit 6bba48c

Please sign in to comment.