From 125c571d4a313e05f42f8749b74a858b2d00f277 Mon Sep 17 00:00:00 2001 From: yuyi Date: Wed, 26 Jul 2023 19:52:22 +0800 Subject: [PATCH] scanner: minor cleanup in ident_string() (#18971) --- 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 d19bb2e321..67540cb0c2 100644 --- a/vlib/v/scanner/scanner.v +++ b/vlib/v/scanner/scanner.v @@ -1150,7 +1150,7 @@ fn (mut s Scanner) ident_string() string { col: s.pos - s.last_nl_pos - 1 } q := s.text[s.pos] - is_quote := q == scanner.single_quote || q == scanner.double_quote + is_quote := q in [scanner.single_quote, scanner.double_quote] is_raw := is_quote && s.pos > 0 && s.text[s.pos - 1] == `r` && !s.is_inside_string is_cstr := is_quote && s.pos > 0 && s.text[s.pos - 1] == `c` && !s.is_inside_string // don't interpret quote as "start of string" quote when a string interpolation has