mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Update the lexing implementation to defer to the regex library, which will pass back the pointer from to resume lexing, and update the emission to call the new `Regex(_regexString:version:)` overload, that will accept the regex string with delimiters. Because this uses the library's lexing implementation, the delimiters are now `'/.../'` and `'|...|'` instead of plain `'...'`.
11 lines
226 B
Swift
11 lines
226 B
Swift
// RUN: %target-typecheck-verify-swift -enable-experimental-string-processing
|
|
// REQUIRES: libswift
|
|
|
|
_ = '/abc/'
|
|
|
|
_ = ('/[*/', '/+]/', '/.]/')
|
|
// expected-error@-1 {{cannot parse regular expression}}
|
|
|
|
_ = '/\w+/'
|
|
_ = '/\'\\/'
|