mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
scanner: do not warn on \' after string interpolation (#8729)
This commit is contained in:
parent
486bf8517f
commit
848295cdea
@ -609,7 +609,7 @@ fn (mut s Scanner) text_scan() token.Token {
|
|||||||
// end of `$expr`
|
// end of `$expr`
|
||||||
// allow `'$a.b'` and `'$a.c()'`
|
// allow `'$a.b'` and `'$a.c()'`
|
||||||
if s.is_inter_start && next_char == `\\`
|
if s.is_inter_start && next_char == `\\`
|
||||||
&& s.look_ahead(2) !in [`x`, `n`, `r`, `\\`, `t`, `e`, `"`] {
|
&& s.look_ahead(2) !in [`x`, `n`, `r`, `\\`, `t`, `e`, `"`, `\'`] {
|
||||||
s.warn('unknown escape sequence \\${s.look_ahead(2)}')
|
s.warn('unknown escape sequence \\${s.look_ahead(2)}')
|
||||||
}
|
}
|
||||||
if s.is_inter_start && next_char == `(` {
|
if s.is_inter_start && next_char == `(` {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user