c2: deprecate raw string pattern

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2022-07-17 00:20:12 +01:00
parent d621f7a3e2
commit 8c3ba22ae0
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
1 changed files with 4 additions and 0 deletions

View File

@ -852,6 +852,10 @@ static int c2_parse_pattern(const char *pattern, int offset, c2_ptr_t *presult)
C2H_SKIP_SPACES();
}
if (raw == true) {
log_warn("Raw string patterns has been deprecated. pos %d", offset);
}
// Check for delimiters
if (pattern[offset] == '\"' || pattern[offset] == '\'') {
pleaf->ptntype = C2_L_PTSTRING;