SourceLine
public struct SourceLine : Hashable, Sendable
extension SourceLine: CustomStringConvertible
A line of a source file.
-
The source file containing the position.
Declaration
Swift
public let file: SourceFile -
The 1-based index of the line in
file.Declaration
Swift
public let number: Int -
Creates an instance representing the line at
indexinurl.Declaration
Swift
init(_ index: Int, in file: SourceFile) -
The source text contained in this line.
Declaration
Swift
public var text: Substring { get } -
The bounds of this line, including any trailing newline.
Declaration
Swift
public var bounds: SourceRange { get } -
Declaration
Swift
public var description: String { get }
View on GitHub