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

'$foo()' string interpolation

This commit is contained in:
Alexander Medvednikov
2019-12-08 22:22:47 +03:00
parent ef821379da
commit 8f9b6ac248
11 changed files with 57 additions and 42 deletions

View File

@ -279,7 +279,7 @@ fn (p mut Parser) comptime_method_call(typ Type) {
p.gen(' else ')
}
p.genln('if ( string_eq($var, _STR("$method.name")) ) ' +
'${typ.name}_$method.name($amp $p.expr_var.name);')
'${typ.name}_$method.name ($amp $p.expr_var.name);')
j++
}
p.check(.lpar)