StructureRegexBuilder5.9.0
AlternationBuilder
A custom parameter attribute that constructs regular expression alternations from closures.
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
@resultBuilder struct AlternationBuilder
When you use a ChoiceOf
initializer, the initializer’s closure parameter has an AlternationBuilder
attribute, allowing you to provide multiple regular expression statements as alternatives.
Citizens in RegexBuilder
Members
static func buildExpression<R>(R
) -> R static func buildPartialBlock(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<Substring> static func buildPartialBlock<W1, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?, C10?)> static func buildPartialBlock<W1, C1, C2, C3, C4, C5, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?)> static func buildPartialBlock<W1, C1, C2, C3, C4, C5, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?)> static func buildPartialBlock<W1, C1, C2, C3, C4, C5, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?)> static func buildPartialBlock<W1, C1, C2, C3, C4, C5, C6>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?, C5?, C6?)> static func buildPartialBlock<W1, C1, C2, C3, C4, C5>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?, C5?)> static func buildPartialBlock<W1, C1, C2, C3, C4>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?)> static func buildPartialBlock<W1, C1, C2, C3>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1?, C2?, C3?)> static func buildPartialBlock<W1, C1, C2>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1?, C2?)> static func buildPartialBlock<W1, C1>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, C8, C9, W1, C10>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8, C9)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, C8, W1, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8, C9?, C10?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, C8, W1, C9>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8, C9?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, W1, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8?, C9?, C10?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, W1, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8?, C9?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, W1, C8>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, W1, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7?, C8?, C9?, C10?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, W1, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7?, C8?, C9?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, W1, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7?, C8?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, W1, C7>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, W1, C6, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6?, C7?, C8?, C9?, C10?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, W1, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6?, C7?, C8?, C9?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, W1, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6?, C7?, C8?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, W1, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6?, C7?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5, W1, C6>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6?)> static func buildPartialBlock<W0, C1, C2, C3, C4, C5>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5)> static func buildPartialBlock<W0, C1, C2, C3, C4, W1, C5, C6, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5?, C6?, C7?, C8?, C9?, C10?)> static func buildPartialBlock<W0, C1, C2, C3, C4, W1, C5, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5?, C6?, C7?, C8?, C9?)> static func buildPartialBlock<W0, C1, C2, C3, C4, W1, C5, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5?, C6?, C7?, C8?)> static func buildPartialBlock<W0, C1, C2, C3, C4, W1, C5, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5?, C6?, C7?)> static func buildPartialBlock<W0, C1, C2, C3, C4, W1, C5, C6>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5?, C6?)> static func buildPartialBlock<W0, C1, C2, C3, C4, W1, C5>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5?)> static func buildPartialBlock<W0, C1, C2, C3, C4>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4)> static func buildPartialBlock<W0, C1, C2, C3, W1, C4, C5, C6, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4?, C5?, C6?, C7?, C8?, C9?, C10?)> static func buildPartialBlock<W0, C1, C2, C3, W1, C4, C5, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4?, C5?, C6?, C7?, C8?, C9?)> static func buildPartialBlock<W0, C1, C2, C3, W1, C4, C5, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4?, C5?, C6?, C7?, C8?)> static func buildPartialBlock<W0, C1, C2, C3, W1, C4, C5, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4?, C5?, C6?, C7?)> static func buildPartialBlock<W0, C1, C2, C3, W1, C4, C5, C6>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4?, C5?, C6?)> static func buildPartialBlock<W0, C1, C2, C3, W1, C4, C5>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4?, C5?)> static func buildPartialBlock<W0, C1, C2, C3, W1, C4>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3, C4?)> static func buildPartialBlock<W0, C1, C2, C3>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3)> static func buildPartialBlock<W0, C1, C2, W1, C3, C4, C5, C6, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3?, C4?, C5?, C6?, C7?, C8?, C9?, C10?)> static func buildPartialBlock<W0, C1, C2, W1, C3, C4, C5, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3?, C4?, C5?, C6?, C7?, C8?, C9?)> static func buildPartialBlock<W0, C1, C2, W1, C3, C4, C5, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3?, C4?, C5?, C6?, C7?, C8?)> static func buildPartialBlock<W0, C1, C2, W1, C3, C4, C5, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3?, C4?, C5?, C6?, C7?)> static func buildPartialBlock<W0, C1, C2, W1, C3, C4, C5, C6>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3?, C4?, C5?, C6?)> static func buildPartialBlock<W0, C1, C2, W1, C3, C4, C5>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3?, C4?, C5?)> static func buildPartialBlock<W0, C1, C2, W1, C3, C4>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3?, C4?)> static func buildPartialBlock<W0, C1, C2, W1, C3>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2, C3?)> static func buildPartialBlock<W0, C1, C2>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2)> static func buildPartialBlock<W0, C1, W1, C2, C3, C4, C5, C6, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?, C10?)> static func buildPartialBlock<W0, C1, W1, C2, C3, C4, C5, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?)> static func buildPartialBlock<W0, C1, W1, C2, C3, C4, C5, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?, C5?, C6?, C7?, C8?)> static func buildPartialBlock<W0, C1, W1, C2, C3, C4, C5, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?, C5?, C6?, C7?)> static func buildPartialBlock<W0, C1, W1, C2, C3, C4, C5, C6>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?, C5?, C6?)> static func buildPartialBlock<W0, C1, W1, C2, C3, C4, C5>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?, C5?)> static func buildPartialBlock<W0, C1, W1, C2, C3, C4>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?)> static func buildPartialBlock<W0, C1, W1, C2, C3>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2?, C3?)> static func buildPartialBlock<W0, C1, W1, C2>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1, C2?)> static func buildPartialBlock<W0, C1>(accumulated: some RegexComponent, next: some RegexComponent
) -> ChoiceOf<(Substring, C1)> static func buildPartialBlock<R>(first: R
) -> ChoiceOf<R.RegexOutput> static func buildPartialBlock<R, W, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10>(first: R
) -> ChoiceOf<(W, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?, C10?)> static func buildPartialBlock<R, W, C1, C2, C3, C4, C5, C6, C7, C8, C9>(first: R
) -> ChoiceOf<(W, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?)> static func buildPartialBlock<R, W, C1, C2, C3, C4, C5, C6, C7, C8>(first: R
) -> ChoiceOf<(W, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?)> static func buildPartialBlock<R, W, C1, C2, C3, C4, C5, C6, C7>(first: R
) -> ChoiceOf<(W, C1?, C2?, C3?, C4?, C5?, C6?, C7?)> static func buildPartialBlock<R, W, C1, C2, C3, C4, C5, C6>(first: R
) -> ChoiceOf<(W, C1?, C2?, C3?, C4?, C5?, C6?)> static func buildPartialBlock<R, W, C1, C2, C3, C4, C5>(first: R
) -> ChoiceOf<(W, C1?, C2?, C3?, C4?, C5?)> static func buildPartialBlock<R, W, C1, C2, C3, C4>(first: R
) -> ChoiceOf<(W, C1?, C2?, C3?, C4?)> static func buildPartialBlock<R, W, C1, C2, C3>(first: R
) -> ChoiceOf<(W, C1?, C2?, C3?)> static func buildPartialBlock<R, W, C1, C2>(first: R
) -> ChoiceOf<(W, C1?, C2?)> static func buildPartialBlock<R, W, C1>(first: R
) -> ChoiceOf<(W, C1?)>