@@ -59,8 +59,8 @@ class RegexDSLTests: XCTestCase {
59
59
( " a c " , ( " a c " , " " , " c " ) ) ,
60
60
captureType: ( Substring, Substring, Substring) . self, == )
61
61
{
62
- CharacterClass . any
63
- capture ( CharacterClass . whitespace) // Substring
62
+ . any
63
+ capture ( . whitespace) // Substring
64
64
capture ( " c " ) // Substring
65
65
}
66
66
}
@@ -140,7 +140,7 @@ class RegexDSLTests: XCTestCase {
140
140
" a " .+
141
141
capture ( oneOrMore ( Character ( " b " ) ) ) // Substring
142
142
capture ( many ( " c " ) ) // Substring
143
- capture ( CharacterClass . hexDigit) .* // [Substring]
143
+ capture ( . hexDigit) .* // [Substring]
144
144
" e " .?
145
145
capture ( " t " | " k " ) // Substring
146
146
oneOf { capture ( " k " ) ; capture ( " j " ) } // (Substring?, Substring?)
@@ -154,7 +154,7 @@ class RegexDSLTests: XCTestCase {
154
154
{
155
155
oneOrMore {
156
156
oneOrMore ( . word)
157
- capture ( CharacterClass . digit)
157
+ capture ( . digit)
158
158
}
159
159
}
160
160
@@ -164,7 +164,7 @@ class RegexDSLTests: XCTestCase {
164
164
{
165
165
oneOrMore {
166
166
oneOrMore ( . word, . reluctantly)
167
- capture ( CharacterClass . digit)
167
+ capture ( . digit)
168
168
}
169
169
}
170
170
@@ -174,9 +174,9 @@ class RegexDSLTests: XCTestCase {
174
174
{
175
175
oneOrMore {
176
176
oneOrMore ( . reluctantly) {
177
- CharacterClass . word
177
+ . word
178
178
}
179
- capture ( CharacterClass . digit)
179
+ capture ( . digit)
180
180
}
181
181
}
182
182
}
@@ -293,13 +293,13 @@ class RegexDSLTests: XCTestCase {
293
293
func testUnicodeScalarPostProcessing( ) throws {
294
294
let spaces = Regex {
295
295
many {
296
- CharacterClass . whitespace
296
+ . whitespace
297
297
}
298
298
}
299
299
300
300
let unicodeScalar = Regex {
301
301
oneOrMore {
302
- CharacterClass . hexDigit
302
+ . hexDigit
303
303
}
304
304
spaces
305
305
}
@@ -316,12 +316,12 @@ class RegexDSLTests: XCTestCase {
316
316
317
317
capture {
318
318
oneOrMore {
319
- CharacterClass . word
319
+ . word
320
320
}
321
321
}
322
322
323
323
many {
324
- CharacterClass . any
324
+ . any
325
325
}
326
326
}
327
327
@@ -342,19 +342,19 @@ class RegexDSLTests: XCTestCase {
342
342
343
343
let regexWithCapture = Regex {
344
344
capture {
345
- oneOrMore ( CharacterClass . hexDigit)
345
+ oneOrMore ( . hexDigit)
346
346
} transform: { Unicode . Scalar ( hex: $0) }
347
347
optionally {
348
348
" .. "
349
349
capture {
350
- oneOrMore ( CharacterClass . hexDigit)
350
+ oneOrMore ( . hexDigit)
351
351
} transform: { Unicode . Scalar ( hex: $0) }
352
352
}
353
- oneOrMore ( CharacterClass . whitespace)
353
+ oneOrMore ( . whitespace)
354
354
" ; "
355
- oneOrMore ( CharacterClass . whitespace)
356
- capture ( oneOrMore ( CharacterClass . word) )
357
- many ( CharacterClass . any)
355
+ oneOrMore ( . whitespace)
356
+ capture ( oneOrMore ( . word) )
357
+ many ( . any)
358
358
} // Regex<(Substring, Unicode.Scalar?, Unicode.Scalar??, Substring)>
359
359
do {
360
360
// Assert the inferred capture type.
@@ -373,23 +373,23 @@ class RegexDSLTests: XCTestCase {
373
373
374
374
let regexWithTryCapture = Regex {
375
375
tryCapture {
376
- oneOrMore ( CharacterClass . hexDigit)
376
+ oneOrMore ( . hexDigit)
377
377
} transform: {
378
378
Unicode . Scalar ( hex: $0)
379
379
}
380
380
optionally {
381
381
" .. "
382
382
tryCapture {
383
- oneOrMore ( CharacterClass . hexDigit)
383
+ oneOrMore ( . hexDigit)
384
384
} transform: {
385
385
Unicode . Scalar ( hex: $0)
386
386
}
387
387
}
388
- oneOrMore ( CharacterClass . whitespace)
388
+ oneOrMore ( . whitespace)
389
389
" ; "
390
- oneOrMore ( CharacterClass . whitespace)
391
- capture ( oneOrMore ( CharacterClass . word) )
392
- many ( CharacterClass . any)
390
+ oneOrMore ( . whitespace)
391
+ capture ( oneOrMore ( . word) )
392
+ many ( . any)
393
393
} // Regex<(Substring, Unicode.Scalar, Unicode.Scalar?, Substring)>
394
394
do {
395
395
// Assert the inferred capture type.
0 commit comments