@@ -13,30 +13,30 @@ import _RegexParser
13
13
14
14
extension RegexComponent {
15
15
/// Returns a regular expression that ignores casing when matching.
16
- public func ignoringCase( _ ignoreCase: Bool = true ) -> Regex < Output > {
16
+ public func ignoringCase( _ ignoreCase: Bool = true ) -> Regex < RegexOutput > {
17
17
wrapInOption ( . caseInsensitive, addingIf: ignoreCase)
18
18
}
19
19
20
20
/// Returns a regular expression that only matches ASCII characters as "word
21
21
/// characters".
22
- public func usingASCIIWordCharacters( _ useASCII: Bool = true ) -> Regex < Output > {
22
+ public func usingASCIIWordCharacters( _ useASCII: Bool = true ) -> Regex < RegexOutput > {
23
23
wrapInOption ( . asciiOnlyDigit, addingIf: useASCII)
24
24
}
25
25
26
26
/// Returns a regular expression that only matches ASCII characters as digits.
27
- public func usingASCIIDigits( _ useASCII: Bool = true ) -> Regex < Output > {
27
+ public func usingASCIIDigits( _ useASCII: Bool = true ) -> Regex < RegexOutput > {
28
28
wrapInOption ( . asciiOnlyDigit, addingIf: useASCII)
29
29
}
30
30
31
31
/// Returns a regular expression that only matches ASCII characters as space
32
32
/// characters.
33
- public func usingASCIISpaces( _ useASCII: Bool = true ) -> Regex < Output > {
33
+ public func usingASCIISpaces( _ useASCII: Bool = true ) -> Regex < RegexOutput > {
34
34
wrapInOption ( . asciiOnlySpace, addingIf: useASCII)
35
35
}
36
36
37
37
/// Returns a regular expression that only matches ASCII characters when
38
38
/// matching character classes.
39
- public func usingASCIICharacterClasses( _ useASCII: Bool = true ) -> Regex < Output > {
39
+ public func usingASCIICharacterClasses( _ useASCII: Bool = true ) -> Regex < RegexOutput > {
40
40
wrapInOption ( . asciiOnlyPOSIXProps, addingIf: useASCII)
41
41
}
42
42
@@ -45,7 +45,7 @@ extension RegexComponent {
45
45
///
46
46
/// This option is enabled by default; pass `false` to disable use of
47
47
/// Unicode's word boundary algorithm.
48
- public func usingUnicodeWordBoundaries( _ useUnicodeWordBoundaries: Bool = true ) -> Regex < Output > {
48
+ public func usingUnicodeWordBoundaries( _ useUnicodeWordBoundaries: Bool = true ) -> Regex < RegexOutput > {
49
49
wrapInOption ( . unicodeWordBoundaries, addingIf: useUnicodeWordBoundaries)
50
50
}
51
51
@@ -54,7 +54,7 @@ extension RegexComponent {
54
54
///
55
55
/// - Parameter dotMatchesNewlines: A Boolean value indicating whether `.`
56
56
/// should match a newline character.
57
- public func dotMatchesNewlines( _ dotMatchesNewlines: Bool = true ) -> Regex < Output > {
57
+ public func dotMatchesNewlines( _ dotMatchesNewlines: Bool = true ) -> Regex < RegexOutput > {
58
58
wrapInOption ( . singleLine, addingIf: dotMatchesNewlines)
59
59
}
60
60
@@ -95,7 +95,7 @@ extension RegexComponent {
95
95
/// // Prints "true"
96
96
/// print(decomposed.contains(queRegexScalar))
97
97
/// // Prints "false"
98
- public func matchingSemantics( _ semanticLevel: RegexSemanticLevel ) -> Regex < Output > {
98
+ public func matchingSemantics( _ semanticLevel: RegexSemanticLevel ) -> Regex < RegexOutput > {
99
99
switch semanticLevel. base {
100
100
case . graphemeCluster:
101
101
return wrapInOption ( . graphemeClusterSemantics, addingIf: true )
@@ -139,7 +139,7 @@ extension RegexComponent {
139
139
///
140
140
/// - Parameter matchLineEndings: A Boolean value indicating whether `^` and
141
141
/// `$` should match the start and end of lines, respectively.
142
- public func anchorsMatchLineEndings( _ matchLineEndings: Bool = true ) -> Regex < Output > {
142
+ public func anchorsMatchLineEndings( _ matchLineEndings: Bool = true ) -> Regex < RegexOutput > {
143
143
wrapInOption ( . multiline, addingIf: matchLineEndings)
144
144
}
145
145
@@ -153,7 +153,7 @@ extension RegexComponent {
153
153
///
154
154
/// - Parameter useReluctantCaptures: A Boolean value indicating whether
155
155
/// quantifiers should be reluctant by default.
156
- public func reluctantCaptures( _ useReluctantCaptures: Bool = true ) -> Regex < Output > {
156
+ public func reluctantCaptures( _ useReluctantCaptures: Bool = true ) -> Regex < RegexOutput > {
157
157
wrapInOption ( . reluctantByDefault, addingIf: useReluctantCaptures)
158
158
}
159
159
}
@@ -162,7 +162,7 @@ extension RegexComponent {
162
162
extension RegexComponent {
163
163
fileprivate func wrapInOption(
164
164
_ option: AST . MatchingOption . Kind ,
165
- addingIf shouldAdd: Bool ) -> Regex < Output >
165
+ addingIf shouldAdd: Bool ) -> Regex < RegexOutput >
166
166
{
167
167
let sequence = shouldAdd
168
168
? AST . MatchingOptionSequence ( adding: [ . init( option, location: . fake) ] )
0 commit comments