swiftlang / swift-experimental-string-processing

An early experimental general-purpose pattern matching engine for Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adjacent scalars should always be coalesced

hamishknight opened this issue Β· 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