diff src/dict.c @ 21148:667192c5938b v8.2.1125

patch 8.2.1125: Vim9: double quote can be a string or a comment Commit: https://github.com/vim/vim/commit/962d7213194647e90f9bdc608f693d39dd07cbd5 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 4 14:15:00 2020 +0200 patch 8.2.1125: Vim9: double quote can be a string or a comment Problem: Vim9: double quote can be a string or a comment. Solution: Only support comments starting with # to avoid confusion.
author Bram Moolenaar <Bram@vim.org>
date Sat, 04 Jul 2020 14:30:04 +0200
parents b0baa80cb53f
children 8d1d11afd8c8
line wrap: on
line diff
--- a/src/dict.c
+++ b/src/dict.c
@@ -787,8 +787,8 @@ get_literal_key(char_u **arg, typval_T *
 
 /*
  * Allocate a variable for a Dictionary and fill it from "*arg".
+ * "*arg" points to the "{".
  * "literal" is TRUE for #{key: val}
- * "flags" can have EVAL_EVALUATE and other EVAL_ flags.
  * Return OK or FAIL.  Returns NOTDONE for {expr}.
  */
     int
@@ -830,7 +830,7 @@ eval_dict(char_u **arg, typval_T *rettv,
     tvkey.v_type = VAR_UNKNOWN;
     tv.v_type = VAR_UNKNOWN;
 
-    *arg = skipwhite_and_linebreak_keep_string(*arg + 1, evalarg);
+    *arg = skipwhite_and_linebreak(*arg + 1, evalarg);
     while (**arg != '}' && **arg != NUL)
     {
 	if ((literal
@@ -862,7 +862,7 @@ eval_dict(char_u **arg, typval_T *rettv,
 	    goto failret;
 	}
 
-	*arg = skipwhite_and_linebreak_keep_string(*arg + 1, evalarg);
+	*arg = skipwhite_and_linebreak(*arg + 1, evalarg);
 	if (eval1(arg, &tv, evalarg) == FAIL)	// recursive!
 	{
 	    if (evaluate)
@@ -904,7 +904,7 @@ eval_dict(char_u **arg, typval_T *rettv,
 	}
 
 	// the "}" can be on the next line
-	*arg = skipwhite_and_linebreak_keep_string(*arg, evalarg);
+	*arg = skipwhite_and_linebreak(*arg, evalarg);
 	if (**arg == '}')
 	    break;
 	if (!had_comma)