Skip to content

Commit 18c4f9c

Browse files
authored
Merge pull request #1980 from ahoppen/ahoppen/line-column-only-in-debug-description
Only print line + column in `SyntaxProtocol.debugDescription`
2 parents f790929 + 83c3d8b commit 18c4f9c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Sources/SwiftSyntax/SourceLocation.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ public struct SourceLocation: Hashable, Codable {
1515

1616
/// The line in the file where this location resides. 1-based.
1717
///
18-
/// ### See also
19-
/// ``SourceLocation/presumedLine``
18+
/// - SeeAlso: ``SourceLocation/presumedLine``
2019
public var line: Int
2120

2221
/// The UTF-8 byte offset from the beginning of the line where this location
@@ -28,8 +27,7 @@ public struct SourceLocation: Hashable, Codable {
2827

2928
/// The file in which this location resides.
3029
///
31-
/// ### See also
32-
/// ``SourceLocation/presumedFile``
30+
/// - SeeAlso: ``SourceLocation/presumedFile``
3331
public let file: String
3432

3533
/// The line of this location when respecting `#sourceLocation` directives.

Sources/SwiftSyntax/Syntax.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ public extension SyntaxProtocol {
738738

739739
if let converter {
740740
let range = sourceRange(converter: converter)
741-
target.write(" [\(range.start)...\(range.end)]")
741+
target.write(" [\(range.start.line):\(range.start.column)...\(range.end.line):\(range.end.column)]")
742742
}
743743

744744
if let tokenView = raw.tokenView, tokenView.presence == .missing {

0 commit comments

Comments
 (0)