From f30faf2627af409ac5e8049dc737810361a3261d Mon Sep 17 00:00:00 2001 From: Lukas Neubert Date: Mon, 7 Dec 2020 17:21:34 +0100 Subject: [PATCH] scanner: allow \e escape used for ANSI colors (#7177) --- vlib/v/scanner/scanner.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/scanner/scanner.v b/vlib/v/scanner/scanner.v index 324f623124..674a55627c 100644 --- a/vlib/v/scanner/scanner.v +++ b/vlib/v/scanner/scanner.v @@ -580,7 +580,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 [`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)}') } if s.is_inter_start && next_char == `(` {