Describe the bug
It looks like there is a problem when parsing escaped single quote within string interpolation in the scanner (Spytheman's hypothesis).
Reproduction Steps
module main
import term
fn main () {
println ('Hey it\' s ${term .blue ('Tony \'s ')} car !' )
}
Expected Behavior
Fine compilation.
Current Behavior
main.v:8 :1 : error: unfinished string literal
6 | println ('Hey it\' s ${term .blue ('Tony \'s ')} car !' )
7 | }
Possible Solution
Using a local variable.
str := 'Tony\' s'
println ('Hey it\' s ${term .blue (str )} car !' )
Additional Information/Context
Spytheman also add (Note double quotes):
https://discord.com/channels/592103645835821068/592294828432424960/1360579781992644700
module main
import term
fn main () {
println ('Hey it\' s ${term .blue ("Tony \'s ")} car !' )
}
also work, but vfmt tool will replace double quotes by single, and next compilation will fail.
V version
V 0.4.10 c2e27ef
Environment details (OS name and version, etc.)
Debian linux testing (trixie)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
Describe the bug
It looks like there is a problem when parsing escaped single quote within string interpolation in the scanner (Spytheman's hypothesis).
Reproduction Steps
Expected Behavior
Fine compilation.
Current Behavior
Possible Solution
Using a local variable.
Additional Information/Context
Spytheman also add (Note double quotes):
https://discord.com/channels/592103645835821068/592294828432424960/1360579781992644700
also work, but vfmt tool will replace double quotes by single, and next compilation will fail.
V version
V 0.4.10 c2e27ef
Environment details (OS name and version, etc.)
Debian linux testing (trixie)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.