Open bbrk24 opened 11 months ago
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.
ChoiceOf.init<T: Collection<Substring>>(_ arr: T)
AlternationBuilder.buildArray<R: RegexComponent<Substring>>(_ components: [R])
ChoiceOf
+1
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)
orAlternationBuilder.buildArray<R: RegexComponent<Substring>>(_ components: [R])
, but it should be possible to create aChoiceOf
from a collection.