patch 8.2.1306: checking for first character of dict key is inconsistent
Problem: Checking for first character of dict key is inconsistent.
Solution: Add eval_isdictc(). (closes #6546)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 8efb1f6..1ed3211 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -3758,7 +3758,7 @@
if (next != NULL &&
((next[0] == '-' && next[1] == '>'
&& (next[2] == '{' || ASCII_ISALPHA(next[2])))
- || (next[0] == '.' && ASCII_ISALPHA(next[1]))))
+ || (next[0] == '.' && eval_isdictc(next[1]))))
{
next = next_line_from_context(cctx, TRUE);
if (next == NULL)
@@ -3922,7 +3922,7 @@
return FAIL;
// dictionary member: dict.name
p = *arg;
- if (eval_isnamec1(*p))
+ if (eval_isdictc(*p))
while (eval_isnamec(*p))
MB_PTR_ADV(p);
if (p == *arg)