1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

scanner: fix string interpolation in raw strings

This commit is contained in:
Alexander Medvednikov
2019-11-03 23:57:26 +03:00
parent 3449a8bc4d
commit 4e64a58ac1
3 changed files with 13 additions and 6 deletions

View File

@ -2733,7 +2733,7 @@ fn (p mut Parser) string_expr() {
// `C.puts('hi')` => `puts("hi");`
/*
Calling a C function sometimes requires a call to a string method
C.fun('ssss'.to_wide()) => fun(string_to_wide(tos2((byte*)('ssss'))))
C.fun('ssss'.to_wide()) => fun(string_to_wide(tos3("ssss")))
*/
if (p.calling_c && p.peek() != .dot) || (p.pref.translated && p.mod == 'main') {
p.gen('"$f"')