Skip to content

Commit 81aed01

Browse files
committed
cleanup
1 parent 49871eb commit 81aed01

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/_StringProcessing/Unicode/WordBreaking.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
@_spi(_Unicode)
1313
import Swift
1414

15+
// TODO: Sink onto String
1516
extension Processor {
1617
func atSimpleBoundary(
1718
_ usesAsciiWord: Bool,
@@ -20,9 +21,11 @@ extension Processor {
2021
func matchesWord(at i: Input.Index) -> Bool {
2122
switch semanticLevel {
2223
case .graphemeCluster:
24+
// TODO: needs benchmark coverage
2325
let c = input[i]
2426
return c.isWordCharacter && (c.isASCII || !usesAsciiWord)
2527
case .unicodeScalar:
28+
// TODO: needs benchmark coverage
2629
let c = input.unicodeScalars[i]
2730
return (c.properties.isAlphabetic || c == "_") && (c.isASCII || !usesAsciiWord)
2831
}
@@ -51,6 +54,7 @@ extension String {
5154
using cache: inout Set<String.Index>?,
5255
_ maxIndex: inout String.Index?
5356
) -> Bool {
57+
// TODO: needs benchmark coverage
5458
guard i != startIndex, i != endIndex else {
5559
return true
5660
}

0 commit comments

Comments
 (0)