Skip to content

Commit 35f9171

Browse files
committed
Tweaks to some comments
Remove some comments that are no longer needed, and update a couple.
1 parent 49418d2 commit 35f9171

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Sources/_MatchingEngine/Regex/AST/Group.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension AST {
2727
case nonCaptureReset
2828

2929
// (?>...)
30-
case atomicNonCapturing // TODO: is Oniguruma capturing?
30+
case atomicNonCapturing
3131

3232
// (?=...)
3333
case lookahead

Sources/_MatchingEngine/Regex/Parse/LexicalAnalysis.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ extension Source {
514514
/// Try to lex a sequence of matching options.
515515
///
516516
/// MatchingOptionSeq -> '^' MatchingOption* | MatchingOption+
517-
/// | MatchingOption* '-' MatchingOption+
517+
/// | MatchingOption* '-' MatchingOption*
518518
///
519519
mutating func lexMatchingOptionSequence(
520520
) throws -> AST.MatchingOptionSequence? {
@@ -527,8 +527,8 @@ extension Source {
527527
adding.append(opt)
528528
}
529529

530-
// If the sequence begun with a caret '^', options can be added, so we're
531-
// done.
530+
// If the sequence begun with a caret '^', options can only be added, so
531+
// we're done.
532532
if ateCaret.value {
533533
return .init(caretLoc: ateCaret.location, adding: adding, minusLoc: nil,
534534
removing: [])

Sources/_MatchingEngine/Regex/Parse/Parse.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,6 @@ extension Parser {
252252
mutating func parseCCCMembers(
253253
into members: inout Array<CustomCC.Member>
254254
) throws {
255-
// FIXME: Track source locations
256-
257255
// Parse members until we see the end of the custom char class or an
258256
// operator.
259257
while source.peek() != "]" && source.peekCCBinOp() == nil {

Sources/_MatchingEngine/Utility/MissingUnicode.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ extension Unicode {
240240
case spaceSeparator = "Zs"
241241
}
242242

243-
// A list of unicode properties that can either be true or false.
244-
// https://www.unicode.org/Public/UCD/latest/ucd/PropertyAliases.txt
243+
/// A list of unicode properties that can either be true or false.
244+
/// https://www.unicode.org/Public/UCD/latest/ucd/PropertyAliases.txt
245245
public enum BinaryProperty: String, Hashable {
246246
case asciiHexDigit = "ASCII_Hex_Digit"
247247
case alphabetic = "Alphabetic"
@@ -313,7 +313,9 @@ extension Unicode {
313313
}
314314
}
315315

316-
// Oniguruma properties that are not covered by the above.
316+
/// Oniguruma properties that are not covered by Unicode spellings.
317+
/// TODO: These should become aliases for the Block (blk) Unicode character
318+
/// property.
317319
public enum OnigurumaSpecialProperty: String, Hashable {
318320
case inBasicLatin = "In_Basic_Latin"
319321
case inLatin1Supplement = "In_Latin_1_Supplement"

0 commit comments

Comments
 (0)