diff --git a/Sources/RegexBuilder/DSL.swift b/Sources/RegexBuilder/DSL.swift index e758999ef..fd6c4267d 100644 --- a/Sources/RegexBuilder/DSL.swift +++ b/Sources/RegexBuilder/DSL.swift @@ -81,8 +81,6 @@ extension UnicodeScalar: RegexComponent { // MARK: Quantification -// Note: Quantifiers are currently gyb'd. - /// A regex component that matches exactly one occurrence of its underlying /// component. @available(SwiftStdlib 5.7, *) diff --git a/Sources/_StringProcessing/Regex/AnyRegexOutput.swift b/Sources/_StringProcessing/Regex/AnyRegexOutput.swift index 0cf27af6b..af05dd11e 100644 --- a/Sources/_StringProcessing/Regex/AnyRegexOutput.swift +++ b/Sources/_StringProcessing/Regex/AnyRegexOutput.swift @@ -22,8 +22,8 @@ public struct AnyRegexOutput { extension AnyRegexOutput { /// Creates a type-erased regex output from an existing match. /// - /// Use this initializer to fit a strongly-typed regex match into the - /// use site of a type-erased regex output. + /// Use this initializer to fit a regex with strongly typed captures into the + /// use site of a dynamic regex, like one that was created from a string. public init(_ match: Regex.Match) { self = match.anyRegexOutput } @@ -206,8 +206,8 @@ extension Regex where Output == AnyRegexOutput { extension Regex.Match where Output == AnyRegexOutput { /// Creates a type-erased regex match from an existing match. /// - /// Use this initializer to fit a regex match with strongly-typed captures into the - /// use site of a type-erased regex match. + /// Use this initializer to fit a regex match with strongly typed captures into the + /// use site of a dynamic regex match, like one that was created from a string. public init(_ match: Regex.Match) { self.init( anyRegexOutput: match.anyRegexOutput, @@ -220,9 +220,8 @@ extension Regex.Match where Output == AnyRegexOutput { extension Regex { /// Creates a strongly-typed regex from a type-erased regex. /// - /// Use this initializer to create a strongly-typed regex from - /// one that was created from a string. Returns `nil` if the types - /// don't match. + /// - Returns: A match generic over the output type, if the underlying values + /// can be converted to the output type; otherwise, `nil`. public init?( _ erased: Regex, as: Output.Type = Output.self