Files
swift-mirror/test/StringProcessing/Parse/regex_parse_error.swift
Hamish Knight 128f5d4bc6 Update regex literal lexing and emission
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 `'...'`.
2021-12-17 18:05:31 +00:00

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