scanner: allow \r after $

pull/6975/head
Alexander Medvednikov 2020-11-27 03:27:34 +01:00
parent c27818e247
commit 9b0c96d792
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` // end of `$expr`
// allow `'$a.b'` and `'$a.c()'` // allow `'$a.b'` and `'$a.c()'`
if s.is_inter_start && next_char == `\\` && s.look_ahead(2) !in [`n`, `\\`, `t`] { if s.is_inter_start && next_char == `\\` && s.look_ahead(2) !in [`n`, `r`, `\\`, `t`] {
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 == `(` {