Skip to content

Revise doc comments for API reference style (Swift 5.7) #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Sources/RegexBuilder/DSL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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, *)
Expand Down
13 changes: 6 additions & 7 deletions Sources/_StringProcessing/Regex/AnyRegexOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<Output>(_ match: Regex<Output>.Match) {
self = match.anyRegexOutput
}
Expand Down Expand Up @@ -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<Output>(_ match: Regex<Output>.Match) {
self.init(
anyRegexOutput: match.anyRegexOutput,
Expand All @@ -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<AnyRegexOutput>,
as: Output.Type = Output.self
Expand Down