SourcePosition
public struct SourcePosition : Hashable, Sendable
extension SourcePosition: Comparable
extension SourcePosition: Codable
extension SourcePosition: CustomStringConvertible
A character boundary in a source file.
-
The source file containing the position.
Declaration
Swift
public let file: SourceFile -
The position relative to the source file.
Declaration
Swift
public let index: String.Index -
Creates an instance with the given properties.
Declaration
Swift
public init(_ index: String.Index, in file: SourceFile) -
Creates an instance referring to the given 1-based line and column numbers in
source.Declaration
Swift
public init(line: Int, column: Int, in file: SourceFile) -
The line which
selfresides.Declaration
Swift
public var line: SourceLine { get } -
The line and column number of this position.
Declaration
Swift
public var lineAndColumn: (line: Int, column: Int) { get } -
Returns a site from
ltor.Requires
l.file == r.fileDeclaration
Swift
public static func ..< (l: `Self`, r: `Self`) -> SourceRange -
Declaration
Swift
public static func < (l: `Self`, r: `Self`) -> Bool -
Undocumented
See moreDeclaration
Swift
fileprivate enum CodingKeys : String, CodingKey, Sendable -
Declaration
Swift
public init(from decoder: Decoder) throws -
Declaration
Swift
public func encode(to encoder: Encoder) throws -
Declaration
Swift
public var description: String { get }
View on GitHub