SourceRepresentable
public struct SourceRepresentable<Part>
extension SourceRepresentable: Sendable where Part: Sendable
extension SourceRepresentable: Equatable where Part: Equatable
extension SourceRepresentable: Hashable where Part: Hashable
extension SourceRepresentable: Codable where Part: Codable
A part of an AST node that may have a textual representation in source code.
Note
The site is a non-salient annotation. It does not contribute to a node’s value.-
The part.
Declaration
Swift
public let value: Part -
The site from which
partwas extracted.Declaration
Swift
public let site: SourceRange -
Creates a source representable container, annotating a value with an optional site.
Declaration
Swift
public init(value: Part, range: SourceRange)
-
Returns
selfwithintroducerincorporated into its value.Precondition
selfhas no introducer.`Declaration
Swift
func introduced(by introducer: SourceRepresentable<AccessEffect>) -> SourceRepresentable<Part>
-
Declaration
Swift
public static func == (l: `Self`, r: `Self`) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
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
View on GitHub