scanner: do not warn for \x07 in strings

pull/7113/head
Delyan Angelov 2020-12-03 14:11:32 +02:00
parent 2f6757b315
commit eefdf4baa6
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 1 additions and 1 deletions

View File

@ -579,7 +579,7 @@ fn (mut s Scanner) text_scan() token.Token {
}
// end of `$expr`
// allow `'$a.b'` and `'$a.c()'`
if s.is_inter_start && next_char == `\\` && s.look_ahead(2) !in [`n`, `r`, `\\`, `t`] {
if s.is_inter_start && next_char == `\\` && s.look_ahead(2) !in [`x`, `n`, `r`, `\\`, `t`] {
s.warn('unknown escape sequence \\${s.look_ahead(2)}')
}
if s.is_inter_start && next_char == `(` {