From 08fd62339ed1b3e0af42a7d25a9d6717864efcc1 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 2 Oct 2019 15:31:44 +0300 Subject: [PATCH] scanner: fix string interpolation in " strings --- compiler/scanner.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/scanner.v b/compiler/scanner.v index 57e20cdfee..dbeb6bc4af 100644 --- a/compiler/scanner.v +++ b/compiler/scanner.v @@ -247,7 +247,7 @@ fn (s mut Scanner) scan() ScanRes { } // End of $var, start next string if s.inter_end { - if s.text[s.pos] == single_quote { + if s.text[s.pos] == s.quote { //single_quote { s.inter_end = false return scan_res(.str, '') } @@ -277,7 +277,7 @@ fn (s mut Scanner) scan() ScanRes { // 'asdf $b' => "b" is the last name in the string, dont start parsing string // at the next ', skip it if s.inside_string { - if next_char == single_quote { + if next_char == s.quote { s.inter_end = true s.inter_start = false s.inside_string = false