swiftlang / swift-experimental-string-processing

An early experimental general-purpose pattern matching engine for Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Creating a `ChoiceOf` from an array

bbrk24 opened this issue · comments

Relevant forums thread: https://forums.swift.org/t/creating-a-regex-choiceof-from-an-array/68755

I don't mind whether this is ChoiceOf.init<T: Collection<Substring>>(_ arr: T) or AlternationBuilder.buildArray<R: RegexComponent<Substring>>(_ components: [R]), but it should be possible to create a ChoiceOf from a collection.