@@ -78,16 +78,11 @@ public struct RegexOptions : OptionSet {
7878 public static let `default` : RegexOptions = [ caseInsensitive]
7979}
8080
81- #if ! os(Linux)
81+ #if os(Linux)
8282 /**
8383 * Internal implementation that can't be hidden. Skip it.
8484 */
85- typealias RegularExpression = NSRegularExpression
86- #else
87- /**
88- * Internal implementation that can't be hidden. Skip it.
89- */
90- extension RegularExpression {
85+ extension NSRegularExpression {
9186 /**
9287 * Internal implementation that can't be hidden. Skip it.
9388 */
@@ -98,7 +93,7 @@ public struct RegexOptions : OptionSet {
9893/**
9994 * Internal implementation that can't be hidden. Skip it.
10095 */
101- extension RegularExpression . Options : Hashable {
96+ extension NSRegularExpression . Options : Hashable {
10297 /**
10398 * Internal implementation that can't be hidden. Skip it.
10499 */
@@ -123,7 +118,7 @@ extension RegexOptions : Hashable {
123118 }
124119}
125120
126- private let nsToRegexOptionsMap : Dictionary < RegularExpression . Options , RegexOptions > = [
121+ private let nsToRegexOptionsMap : Dictionary < NSRegularExpression . Options , RegexOptions > = [
127122 . caseInsensitive: . caseInsensitive,
128123 . allowCommentsAndWhitespace: . allowCommentsAndWhitespace,
129124 . ignoreMetacharacters: . ignoreMetacharacters,
@@ -132,7 +127,7 @@ private let nsToRegexOptionsMap:Dictionary<RegularExpression.Options, RegexOptio
132127 . useUnixLineSeparators: . useUnixLineSeparators,
133128 . useUnicodeWordBoundaries: . useUnicodeWordBoundaries]
134129
135- private let regexToNSOptionsMap : Dictionary < RegexOptions , RegularExpression . Options > = nsToRegexOptionsMap. map ( { ( key, value) in
130+ private let regexToNSOptionsMap : Dictionary < RegexOptions , NSRegularExpression . Options > = nsToRegexOptionsMap. map ( { ( key, value) in
136131 return ( value, key)
137132 } ) . reduce ( [ : ] , { ( dict, kv) in
138133 var dict = dict
@@ -141,20 +136,20 @@ private let regexToNSOptionsMap:Dictionary<RegexOptions, RegularExpression.Optio
141136 } )
142137
143138extension RegexOptions {
144- var ns : RegularExpression . Options {
139+ var ns : NSRegularExpression . Options {
145140 get {
146141 let nsSeq = regexToNSOptionsMap. filter { ( regex, _) in
147142 self . contains ( regex)
148143 } . map { ( _, ns) in
149144 ns
150145 }
151146
152- return RegularExpression . Options ( nsSeq)
147+ return NSRegularExpression . Options ( nsSeq)
153148 }
154149 }
155150}
156151
157- extension RegularExpression . Options {
152+ extension NSRegularExpression . Options {
158153 var regex : RegexOptions {
159154 get {
160155 let regexSeq = nsToRegexOptionsMap. filter { ( ns, _) in
0 commit comments