BindingPattern
public struct BindingPattern : Pattern
A pattern that introduces new variables.
This pattern alters the semantics of its sub-pattern. Nested name patterns create new variable bindings, instead of referring to existing declarations.
-
An introducer in a binding pattern.
See moreDeclaration
Swift
public enum Introducer : Codable, Sendable -
Declaration
Swift
public let site: SourceRange -
The introducer of the pattern.
Declaration
Swift
public let introducer: SourceRepresentable<Introducer> -
The sub-pattern.
Requires
subpatternmay not contain other binding patterns.Declaration
Swift
public let subpattern: AnyPatternID -
The type annotation of the pattern, if any.
Declaration
Swift
public let annotation: AnyExprID? -
Undocumented
Declaration
Swift
public init( introducer: SourceRepresentable<BindingPattern.Introducer>, subpattern: AnyPatternID, annotation: AnyExprID?, site: SourceRange )
View on GitHub