0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.4883: string interpolation only works in heredoc

Problem:    String interpolation only works in heredoc.
Solution:   Support interpolated strings.  Use syntax for heredoc consistent
            with strings, similar to C#. (closes #10327)
This commit is contained in:
LemonBoy
2022-05-06 13:14:50 +01:00
committed by Bram Moolenaar
parent e7d6dbc572
commit 2eaef106e4
16 changed files with 364 additions and 137 deletions

View File

@@ -3769,8 +3769,12 @@ eval7(
/*
* Environment variable: $VAR.
* Interpolated string: $"string" or $'string'.
*/
case '$': ret = eval_env_var(arg, rettv, evaluate);
case '$': if ((*arg)[1] == '"' || (*arg)[1] == '\'')
ret = eval_interp_string(arg, rettv, evaluate);
else
ret = eval_env_var(arg, rettv, evaluate);
break;
/*