mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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 `'...'`.
8 lines
244 B
Swift
8 lines
244 B
Swift
// RUN: %target-typecheck-verify-swift -enable-experimental-string-processing
|
|
// REQUIRES: libswift
|
|
|
|
let s = '/\\/''/ // expected-error {{unterminated regex literal}}
|
|
|
|
// expected-error@+1 {{unterminated regex literal}}
|
|
var unterminated = '/xy
|