scanner: allow \e escape used for ANSI colors (#7177)
parent
b5982b638a
commit
f30faf2627
|
@ -580,7 +580,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 [`x`, `n`, `r`, `\\`, `t`] {
|
if s.is_inter_start && next_char == `\\` && 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…
Reference in New Issue