swiftlang/swift-experimental-string-processing

Adjacent scalars should always be coalesced

hamishknight opened this issue ยท 0 comments

This applies to the DSL, for example:

    let r3 = Regex {
      "๐Ÿ‘จ" as UnicodeScalar
      "\u{200D}" as UnicodeScalar
      "๐Ÿ‘จ" as UnicodeScalar
      "\u{200D}" as UnicodeScalar
      "๐Ÿ‘ง" as UnicodeScalar
      "\u{200D}" as UnicodeScalar
      "๐Ÿ‘ฆ" as UnicodeScalar
    }

should match "๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ", but currently doesn't. It also applies to custom character classes in regex literals, e.g [e\u{301}] should match e\u{301}, but currently doesn't.

rdar://96942688