runtime(vim): Update base syntax and generator, improve command/function 
distinction

Commit: 
https://github.com/vim/vim/commit/2f7c957c8d89b0fe06896ee0e2eaa1c3c0b2b485
Author: Doug Kearns <dougkea...@gmail.com>
Date:   Fri Jul 18 20:12:29 2025 +0200

    runtime(vim): Update base syntax and generator, improve command/function 
distinction
    
    - Match Ex command modifiers and functions with the same name correctly.
      E.g., :browse and browse().
    - Match full :eval command.
    
    closes: #17789
    
    Signed-off-by: Doug Kearns <dougkea...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/generator/gen_syntax_vim.vim 
b/runtime/syntax/generator/gen_syntax_vim.vim
index 9433f0787..fc7ab5015 100644
--- a/runtime/syntax/generator/gen_syntax_vim.vim
+++ b/runtime/syntax/generator/gen_syntax_vim.vim
@@ -1,7 +1,7 @@
 " Vim syntax file generator
 " Language:             Vim script
 " Maintainer:  Hirohito Higashi (h_east)
-" Last Change: 2025 Jul 03
+" Last Change: 2025 Jul 18
 
 let s:keepcpo= &cpo
 set cpo&vim
@@ -234,39 +234,48 @@ function s:parse_vim_command(cmd)
        endtry
 endfunc
 
-function s:get_cmd_modifiers()
-       try
-               let file_name = $VIM_SRCDIR .. '/ex_docmd.c'
-
-               new
-               exec 'read ' .. file_name
-               norm! gg
-               exec ':/^static cmdmod_info_T cmdmod_info_tab\[] = 
{/+1;/^};/-1yank'
-               %delete _
+function s:memoize_cmd_modifiers()
+       let modifiers = []
+       function _() closure
+               if empty(modifiers)
+                       try
+                               let file_name = $VIM_SRCDIR .. '/ex_docmd.c'
+
+                               new
+                               exec 'read ' .. file_name
+                               norm! gg
+                               exec ':/^static cmdmod_info_T 
cmdmod_info_tab\[] = {/+1;/^};/-1yank'
+                               %delete _
+
+                               put
+                               1delete _
+
+                               let list = []
+                               for line in getline(1, line('$'))
+                                       let list = matchlist(line, 
'^\s*{"\(\w\+\)".*')
+                                       " :browse and :confirm handled 
separately as lower priority matches
+                                       " because they have same-named builtin 
functions
+                                       if index(['browse', 'confirm'], 
list[1]) == -1
+                                               call add(modifiers, 
copy(list[1]))
+                                       endif
+                               endfor
 
-               put
-               1delete _
+                               quit!
 
-               let modifiers = []
-               let list = []
-               for line in getline(1, line('$'))
-                       let list = matchlist(line, '^\s*{"\(\w\+\)".*')
-                       call add(modifiers, copy(list[1]))
-               endfor
-
-               quit!
+                               if empty(modifiers)
+                                       throw 'cmd modifiers list is empty'
+                               endif
 
-               if empty(modifiers)
-                       throw 'cmd modifiers list is empty'
+                       catch /.*/
+                               call s:err_gen('')
+                               throw 'exit'
+                       endtry
                endif
-
                return modifiers
-
-       catch /.*/
-               call s:err_gen('')
-               throw 'exit'
-       endtry
+       endfunction
+       return function("_")
 endfunction
+let s:get_cmd_modifiers = s:memoize_cmd_modifiers()
 
 function s:get_vim_command_type(cmd_name)
        " Return value:
@@ -296,10 +305,13 @@ function s:get_vim_command_type(cmd_name)
                behave
                call
                catch
+               chdir
                class
+               copy
                debuggreedy
                def
                delcommand
+               delete
                delfunction
                doautoall
                doautocmd
@@ -319,6 +331,7 @@ function s:get_vim_command_type(cmd_name)
                endif
                endinterface
                enum
+               eval
                execute
                export
                filetype
@@ -333,6 +346,7 @@ function s:get_vim_command_type(cmd_name)
                import
                interface
                insert
+               join
                k
                let
                loadkeymap
@@ -378,8 +392,10 @@ function s:get_vim_command_type(cmd_name)
                smagic
                snomagic
                sort
+               split
                static
                substitute
+               swapname
                syntax
                tcl
                tcldo
diff --git a/runtime/syntax/generator/vim.vim.base 
b/runtime/syntax/generator/vim.vim.base
index 56579dd96..63c1bb5c9 100644
--- a/runtime/syntax/generator/vim.vim.base
+++ b/runtime/syntax/generator/vim.vim.base
@@ -2,7 +2,7 @@
 " Language:       Vim script
 " Maintainer:     Hirohito Higashi <h.east.727 ATMARK gmail.com>
 "         Doug Kearns <dougkea...@gmail.com>
-" Last Change:    2025 Jul 17
+" Last Change:    2025 Jul 18
 " Former Maintainer: Charles E. Campbell
 
 " DO NOT CHANGE DIRECTLY.
@@ -34,10 +34,22 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell
 " regular vim commands {{{2
 " GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand 
contained', END_STR='nextgroup=vimBang'
 
+" Lower priority :syn-match to allow for :command/function() distinction
+syn match vimCommand "\<chd\%[ir]\>"    nextgroup=vimBang
+syn match vimCommand "\<co\%[py]\>"     nextgroup=vimBang
+syn match vimCommand "\<d\%[elete]\>"   nextgroup=vimBang
+syn match vimCommand "\<j\%[oin]\>"     nextgroup=vimBang
+syn match vimCommand "\<sp\%[lit]\>"    nextgroup=vimBang
+syn match vimCommand "\<sw\%[apname]\>" nextgroup=vimBang
+
 " GEN_SYN_VIM: vimCommand modifier, START_STR='syn keyword 
vimCommandModifier', END_STR='skipwhite 
nextgroup=vimCommandModifierBang,@vimCmdList'
 " :filter is handled specially elsewhere
 syn match      vimCommandModifierBang  contained       " \@1<=!"       
skipwhite nextgroup=@vimCmdList
 
+" Lower priority :syn-match to allow for :command/function() distinction
+syn match vimCommand "\<bro\%[wse]\>"  skipwhite 
nextgroup=vimCommandModifierBang,@vimCmdList
+syn match vimCommand "\<conf\%[irm]\>" skipwhite 
nextgroup=vimCommandModifierBang,@vimCmdList
+
 " Lower priority for _new_ to distinguish constructors from the command.
 syn match   vimCommand contained       "\<new\>(\@!"
 syn match   vimCommand contained       "\<z[-+^.=]\=\>"
@@ -230,7 +242,7 @@ syn match   vimNumber       
'\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*'    skipwhite nextgroup=@vi
 syn case match
 
 " All vimCommands are contained by vimIsCommand. {{{2
-syn cluster vimCmdList 
contains=vimAbb,vimAddress,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSynColor,vimSynLink,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl
+syn cluster vimCmdList 
contains=vimAbb,vimAddress,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSynColor,vimSynLink,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl
 syn cluster vim9CmdList        
contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var
 syn match vimCmdSep    "\\@1<!|"       skipwhite 
nextgroup=@vimCmdList,vimSubst1,@vimFunc
 syn match vimCmdSep    ":\+"   skipwhite nextgroup=@vimCmdList,vimSubst1
@@ -1245,6 +1257,16 @@ syn region       vimExecute
       \ contains=@vimContinue,@vimExprList
       \ transparent
 
+syn region     vimEval
+      \ matchgroup=vimCommand
+      \ start="\<ev\%[al]\>"
+      \ skip=+\|\|||\|
\s*\%(\\|["#]\ \)+
+      \ end="\ze|"
+      \ excludenl end="$"
+      \ nextgroup=vimCmdSep
+      \ contains=@vimContinue,@vimExprList
+      \ transparent
+
 " Filter: {{{2
 " ======
 syn match      vimExFilter             "\<filt\%[er]\>"        skipwhite 
nextgroup=vimExFilterBang,vimExFilterPattern
@@ -2067,7 +2089,7 @@ unlet s:interfaces
 " (following Gautam Iyer's suggestion)
 " ==========================
 syn match      vimFunc contained       "\<\l\w*\ze\s*("                        
        skipwhite nextgroup=vimOperParen contains=vimFuncName
-syn match      vimUserFunc     contained       "\.\@1<=\l\w*\ze\s*("           
        skipwhite nextgroup=vimOperParen contains=vimFuncName
+syn match      vimUserFunc     contained       "\.\@1<=\l\w*\ze\s*("           
        skipwhite nextgroup=vimOperParen
 syn match      vimUserFunc     contained       
"\<\%([[:upper:]_]\|\%(\h\w*\.\)\+\h\)\w*\ze\s*("               skipwhite 
nextgroup=vimOperParen contains=vim9MethodName,vim9Super,vim9This
 syn match      vimUserFunc     contained       
"\<\%(g:\)\=\%(\h\w*#\)\+\h\w*\ze\s*("          skipwhite 
nextgroup=vimOperParen contains=vimVarScope
 syn match      vimUserFunc     contained       
"\%(\<[sgbwtlav]:\|<[sS][iI][dD]>\)\%(\h\w*\.\)*\h\w*\ze\s*("   skipwhite 
nextgroup=vimOperParen contains=vimVarScope,vimNotation
@@ -2224,6 +2246,7 @@ if !exists("skip_vim_syntax_inits")
  hi def link vimEnvvar PreProc
  hi def link vimError  Error
  hi def link vimEscape Special
+ hi def link vimEval   vimCommand
  hi def link vimExFilter       vimCommand
  hi def link vimExFilterBang   vimBang
  hi def link vimExMark vimCommand
diff --git a/runtime/syntax/testdir/dumps/vim9_function_call_01.dump 
b/runtime/syntax/testdir/dumps/vim9_function_call_01.dump
index 065e553ee..cb8b0aa10 100644
--- a/runtime/syntax/testdir/dumps/vim9_function_call_01.dump
+++ b/runtime/syntax/testdir/dumps/vim9_function_call_01.dump
@@ -10,7 +10,7 @@
 |v+0#af5f00255&|a|r| +0#0000000&|b|r|o|w|s|e| |=+0#af5f00255&| 
+0#0000000&|b+0#00e0e07&|r|o|w|s|e|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@51
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|b+0#00e0e07&|r|o|w|s|e|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@59
 |#+0#0000e05&| |f|u|n|c|t|i|o|n| +0#0000000&@64
-|b+0#af5f00255&|r|o|w|s|e|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@64
+|b+0#00e0e07&|r|o|w|s|e|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@64
 |#+0#0000e05&| |c|o|m@1|a|n|d| +0#0000000&@65
 |b+0#af5f00255&|r|o|w|s|e| 
+0#0000000&|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| +0#0000000&@63
 @75
diff --git a/runtime/syntax/testdir/dumps/vim9_function_call_02.dump 
b/runtime/syntax/testdir/dumps/vim9_function_call_02.dump
index 0f8d7a44b..4960c052f 100644
--- a/runtime/syntax/testdir/dumps/vim9_function_call_02.dump
+++ b/runtime/syntax/testdir/dumps/vim9_function_call_02.dump
@@ -13,7 +13,7 @@
 |v+0#af5f00255&|a|r| +0#0000000&|c|o|n|f|i|r|m| |=+0#af5f00255&| 
+0#0000000&|c+0#00e0e07&|o|n|f|i|r|m|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@49
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|c+0#00e0e07&|o|n|f|i|r|m|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@58
 |#+0#0000e05&| |f|u|n|c|t|i|o|n| +0#0000000&@64
-|c+0#af5f00255&|o|n|f|i|r|m|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@63
+|c+0#00e0e07&|o|n|f|i|r|m|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@63
 |#+0#0000e05&| |c|o|m@1|a|n|d| +0#0000000&@65
 |c+0#af5f00255&|o|n|f|i|r|m| 
+0#0000000&|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| +0#0000000&@62
 @75
diff --git a/runtime/syntax/testdir/dumps/vim9_function_call_09.dump 
b/runtime/syntax/testdir/dumps/vim9_function_call_09.dump
index a1e218e78..48d93d7f2 100644
--- a/runtime/syntax/testdir/dumps/vim9_function_call_09.dump
+++ b/runtime/syntax/testdir/dumps/vim9_function_call_09.dump
@@ -17,4 +17,4 @@
 |#+0#0000e05&| |c|o|m@1|a|n|d| +0#0000000&@65
 |i+0#af5f00255&|f| +0#0000000&|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&||| |.+0#af5f00255&@1| +0#0000000&||| |e+0#af5f00255&|n|d|i|f| 
+0#0000000&@54
 @75
-@57|1|6|3|,|0|-|1| @6|5|3|%| 
+@57|1|6|3|,|0|-|1| @6|5|2|%| 
diff --git a/runtime/syntax/testdir/dumps/vim9_function_call_10.dump 
b/runtime/syntax/testdir/dumps/vim9_function_call_10.dump
index 96d1d23f0..26450a3a6 100644
--- a/runtime/syntax/testdir/dumps/vim9_function_call_10.dump
+++ b/runtime/syntax/testdir/dumps/vim9_function_call_10.dump
@@ -17,4 +17,4 @@
 @75
 |e+0#af5f00255&|c|h|o| 
+0#0000000&|a+0#00e0e07&|b|s|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@62
 |e+0#af5f00255&|c|h|o| 
+0#0000000&|(+0#e000e06&|a+0#00e0e07&|b|s|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&@1|
 +0#0000000&@60
-@57|1|8|1|,|1| @8|5|9|%| 
+@57|1|8|1|,|1| @8|5|8|%| 
diff --git a/runtime/syntax/testdir/dumps/vim9_function_call_11.dump 
b/runtime/syntax/testdir/dumps/vim9_function_call_11.dump
index fbf9a33b5..a54617ec3 100644
--- a/runtime/syntax/testdir/dumps/vim9_function_call_11.dump
+++ b/runtime/syntax/testdir/dumps/vim9_function_call_11.dump
@@ -17,4 +17,4 @@
 |v+0#af5f00255&|a|r| +0#0000000&|f|o@1| |=+0#af5f00255&| 
+0#0000000&|g+0#00e0e07&|:|f+0#0000001#ffff4012|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@55
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|g+0#00e0e07&|:|f+0#0000001#ffff4012|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@60
 @75
-@57|1|9@1|,|1| @8|6|5|%| 
+@57|1|9@1|,|1| @8|6|4|%| 
diff --git a/runtime/syntax/testdir/dumps/vim9_function_call_12.dump 
b/runtime/syntax/testdir/dumps/vim9_function_call_12.dump
index 4600baba1..522ffddce 100644
--- a/runtime/syntax/testdir/dumps/vim9_function_call_12.dump
+++ b/runtime/syntax/testdir/dumps/vim9_function_call_12.dump
@@ -17,4 +17,4 @@
 
|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@60
 @75
 |v+0#af5f00255&|a|r| +0#0000000&|f|o@1| |=+0#af5f00255&| 
+0#0000000&|g+0#00e0e07&|:|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@48
-@57|2|1|7|,|1| @8|7|1|%| 
+@57|2|1|7|,|1| @8|7|0|%| 
diff --git a/runtime/syntax/testdir/dumps/vim9_function_call_13.dump 
b/runtime/syntax/testdir/dumps/vim9_function_call_13.dump
index f7a451b14..f36c96729 100644
--- a/runtime/syntax/testdir/dumps/vim9_function_call_13.dump
+++ b/runtime/syntax/testdir/dumps/vim9_function_call_13.dump
@@ -17,4 +17,4 @@
 |v+0#af5f00255&|a|r| +0#0000000&|f|o@1| |=+0#af5f00255&| 
+0#0000000&|v+0#00e0e07&|:|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@48
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|v+0#00e0e07&|:|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@53
 
|v+0#00e0e07&|:|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@58
-@57|2|3|5|,|1| @8|7@1|%| 
+@57|2|3|5|,|1| @8|7|6|%| 
diff --git a/runtime/syntax/testdir/dumps/vim9_function_call_14.dump 
b/runtime/syntax/testdir/dumps/vim9_function_call_14.dump
index bcc576ad0..3c8c14703 100644
--- a/runtime/syntax/testdir/dumps/vim9_function_call_14.dump
+++ b/runtime/syntax/testdir/dumps/vim9_function_call_14.dump
@@ -17,4 +17,4 @@
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|w+0#00e0e07&|:|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)|
 +0#0000000&@55
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|t+0#00e0e07&|:|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)|
 +0#0000000&@55
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|v+0#00e0e07&|:|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)|
 +0#0000000&@55
-@57|2|5|3|,|1| @8|8|3|%| 
+@57|2|5|3|,|1| @8|8|2|%| 
diff --git a/runtime/syntax/testdir/dumps/vim9_function_call_15.dump 
b/runtime/syntax/testdir/dumps/vim9_function_call_15.dump
index 187a9bf26..dfdacdd95 100644
--- a/runtime/syntax/testdir/dumps/vim9_function_call_15.dump
+++ b/runtime/syntax/testdir/dumps/vim9_function_call_15.dump
@@ -17,4 +17,4 @@
 |t+0#00e0e07&|:|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)| 
+0#0000000&@60
 |v+0#00e0e07&|:|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)| 
+0#0000000&@60
 @75
-@57|2|7|1|,|1| @8|8|9|%| 
+@57|2|7|1|,|1| @8|8@1|%| 
diff --git a/runtime/syntax/testdir/dumps/vim9_function_call_16.dump 
b/runtime/syntax/testdir/dumps/vim9_function_call_16.dump
index 5659a7c25..bbfe7516c 100644
--- a/runtime/syntax/testdir/dumps/vim9_function_call_16.dump
+++ b/runtime/syntax/testdir/dumps/vim9_function_call_16.dump
@@ -14,7 +14,7 @@
 |#+0#0000e05&| |c|h|a|i|n|e|d| |f|u|n|c|t|i|o|n| |c|a|l@1|s| +0#0000000&@50
 @75
 
|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|)|.+0#af5f00255&|b+0#0000001#ffff4012|a|r|(+0#e000e06#ffffff0|)|
 +0#0000000&@56
+|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|)|.+0#af5f00255&|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)|
 +0#0000000&@49
 @75
 @75
-|#+0#0000e05&| |I|s@1|u|e| |1|6|7|2|1| |(|V|i|m| |s|c|r|i|p|t| 
|h|i|g|h|l|i|g|h|t| |o|f| |b|u|i|l|t|i|n| |f|u|n|c|t|i|o|n| |a|f|t|e|r| |||)| 
+0#0000000&@10
-@57|2|8|9|,|1| @8|9|5|%| 
+@57|2|8|9|,|1| @8|9|4|%| 
diff --git a/runtime/syntax/testdir/dumps/vim9_function_call_17.dump 
b/runtime/syntax/testdir/dumps/vim9_function_call_17.dump
index 596b388eb..53cfd8c5d 100644
--- a/runtime/syntax/testdir/dumps/vim9_function_call_17.dump
+++ b/runtime/syntax/testdir/dumps/vim9_function_call_17.dump
@@ -1,9 +1,10 @@
-|#+0#0000e05#ffffff0| |I|s@1|u|e| |1|6|7|2|1| |(|V|i|m| |s|c|r|i|p|t| 
|h|i|g|h|l|i|g|h|t| |o|f| |b|u|i|l|t|i|n| |f|u|n|c|t|i|o|n| |a|f|t|e|r| |||)| 
+0#0000000&@10
+| +0&#ffffff0@74
+|#+0#0000e05&| |I|s@1|u|e| |1|6|7|2|1| |(|V|i|m| |s|c|r|i|p|t| 
|h|i|g|h|l|i|g|h|t| |o|f| |b|u|i|l|t|i|n| |f|u|n|c|t|i|o|n| |a|f|t|e|r| |||)| 
+0#0000000&@10
 @75
 |&+0#00e0e07&|d|i|r|e|c|t|o|r|y| +0#0000000&|=+0#af5f00255&| 
+0#0000000&|$+0#e000002&|'|{+0#e000e06&|$|M|Y|V|I|M|D|I|R|}|/+0#e000002&|.|d|a|t|a|/|s|w|a|p|/|'|
 +0#0000000&@35
 |&+0#00e0e07&|b|a|c|k|u|p|d|i|r| +0#0000000&|=+0#af5f00255&| 
+0#0000000&|$+0#e000002&|'|{+0#e000e06&|$|M|Y|V|I|M|D|I|R|}|/+0#e000002&|.|d|a|t|a|/|b|a|c|k|u|p|/@1|'|
 +0#0000000&@32
-|&+0#00e0e07&|u|n|d|o|d|i|r| +0#0000000&|=+0#af5f00255&| 
+0#0000000&|$+0#e000002&|'|{+0#e000e06&|$|M|Y|V|I|M|D|I|R|}|/+0#e000002&|.|d|a|t|a|/|u|n|d|o|/@1|'|
 +0#0000000&@36
->i+0#af5f00255&|f| 
+0#0000000&|!+0#af5f00255&|i+0#00e0e07&|s|d|i|r|e|c|t|o|r|y|(+0#e000e06&|&+0#00e0e07&|u|n|d|o|d|i|r|)+0#e000e06&|
 +0#0000000&@2||| 
|m+0#00e0e07&|k|d|i|r|(+0#e000e06&|&+0#00e0e07&|u|n|d|o|d|i|r|,+0#0000000&| 
|"+0#e000002&|p|"|)+0#e000e06&| +0#0000000&@2||| |e+0#af5f00255&|n|d|i|f| 
+0#0000000&@14
+>&+0#00e0e07&|u|n|d|o|d|i|r| +0#0000000&|=+0#af5f00255&| 
+0#0000000&|$+0#e000002&|'|{+0#e000e06&|$|M|Y|V|I|M|D|I|R|}|/+0#e000002&|.|d|a|t|a|/|u|n|d|o|/@1|'|
 +0#0000000&@36
+|i+0#af5f00255&|f| 
+0#0000000&|!+0#af5f00255&|i+0#00e0e07&|s|d|i|r|e|c|t|o|r|y|(+0#e000e06&|&+0#00e0e07&|u|n|d|o|d|i|r|)+0#e000e06&|
 +0#0000000&@2||| 
|m+0#00e0e07&|k|d|i|r|(+0#e000e06&|&+0#00e0e07&|u|n|d|o|d|i|r|,+0#0000000&| 
|"+0#e000002&|p|"|)+0#e000e06&| +0#0000000&@2||| |e+0#af5f00255&|n|d|i|f| 
+0#0000000&@14
 |i+0#af5f00255&|f| 
+0#0000000&|!+0#af5f00255&|i+0#00e0e07&|s|d|i|r|e|c|t|o|r|y|(+0#e000e06&|&+0#00e0e07&|b|a|c|k|u|p|d|i|r|)+0#e000e06&|
 +0#0000000&||| 
|m+0#00e0e07&|k|d|i|r|(+0#e000e06&|&+0#00e0e07&|b|a|c|k|u|p|d|i|r|,+0#0000000&| 
|"+0#e000002&|p|"|)+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|n|d|i|f| 
+0#0000000&@14
 |i+0#af5f00255&|f| 
+0#0000000&|!+0#af5f00255&|i+0#00e0e07&|s|d|i|r|e|c|t|o|r|y|(+0#e000e06&|&+0#00e0e07&|d|i|r|e|c|t|o|r|y|)+0#e000e06&|
 +0#0000000&||| 
|m+0#00e0e07&|k|d|i|r|(+0#e000e06&|&+0#00e0e07&|d|i|r|e|c|t|o|r|y|,+0#0000000&| 
|"+0#e000002&|p|"|)+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|n|d|i|f| 
+0#0000000&@14
 @75
@@ -11,10 +12,9 @@
 |#+0#0000e05&| |I|s@1|u|e| |#|1|7@1|6@1| |(|v|a|l|i|d| |f|u|n|c|t|i|o|n| 
|c|a|l@1| |h|i|g|h|l|i|g|h|t|e|d| |a|s| |e|r@1|o|r|)| +0#0000000&@17
 || @73
 
|m|o|d|u|l|e|[|0+0#e000002&|]+0#0000000&|.+0#af5f00255&|f+0#0000001#ffff4012|o@1|(+0#e000e06#ffffff0|)|
 +0#0000000&@59
+|m|o|d|u|l|e|[|0+0#e000002&|]+0#0000000&|.+0#af5f00255&|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)|
 +0#0000000&@52
 @75
 |~+0#4040ff13&| @73
 |~| @73
 |~| @73
-|~| @73
-|~| @73
 | +0#0000000&@56|3|0|7|,|1| @8|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_eval_00.dump 
b/runtime/syntax/testdir/dumps/vim_ex_eval_00.dump
new file mode 100644
index 000000000..fe0100845
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_eval_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|e|v|a|l| |c|o|m@1|a|n|d| +0#0000000&@55
+@75
+@75
+|e+0#af5f00255&|v|a|l| 
+0#0000000&|"+0#e000002&|F|o@1|"|-+0#af5f00255&|>|a+0#00e0e07&|p@1|e|n|d|(+0#e000e06&|0+0#e000002&|)+0#e000e06&|
 +0#0000000&@53
+@75
+|e+0#af5f00255&|v|a|l| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@64
+@6|\+0#e000e06&| 
+0#0000000&|-+0#af5f00255&|>|a+0#00e0e07&|p@1|e|n|d|(+0#e000e06&| +0#0000000&@57
+@6|\+0#e000e06&| +0#0000000&|0+0#e000002&| +0#0000000&@65
+@6|\+0#e000e06&| +0#0000000&|)+0#e000e06&| +0#0000000&@65
+@75
+|e+0#af5f00255&|v|a|l| 
+0#0000000&|"+0#e000002&|F|o@1|"|-+0#af5f00255&|>|a+0#00e0e07&|p@1|e|n|d|(+0#e000e06&|0+0#e000002&|)+0#e000e06&|
 +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| 
+0#0000000&@40
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&||| 
|e+0#af5f00255&|v|a|l| 
+0#0000000&|"+0#e000002&|F|o@1|"|-+0#af5f00255&|>|a+0#00e0e07&|p@1|e|n|d|(+0#e000e06&|0+0#e000002&|)+0#e000e06&|
 +0#0000000&@40
+@75
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|,|1| @10|A|l@1| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_03.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_03.dump
index 3f30fb407..20e4ecffa 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_03.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_03.dump
@@ -17,4 +17,4 @@
 |"+0#0000e05&| |c|o|m@1|a|n|d| +0#0000000&@65
 |e+0#af5f00255&|x|e|c|u|t|e|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@63
 |e+0#af5f00255&|x|e|c|u|t|e| 
+0#0000000&|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| +0#0000000&@62
-@57|5@1|,|1| @9|1|9|%| 
+@57|5@1|,|1| @9|1|8|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_04.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_04.dump
index 421d04572..0b24a8ebd 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_04.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_04.dump
@@ -17,4 +17,4 @@
 |"+0#0000e05&| |c|o|m@1|a|n|d| +0#0000000&@65
 |i+0#af5f00255&|n|s|e|r|t| +0#0000000&@68
 |.+0#af5f00255&| +0#0000000&@73
-@57|7|3|,|1| @9|2|6|%| 
+@57|7|3|,|1| @9|2|5|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_05.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_05.dump
index e72eb390f..ae5ffb84d 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_05.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_05.dump
@@ -17,4 +17,4 @@
 @75
 |l+0#af5f00255&|e|t| +0#0000000&|m|a|t|c|h| |=+0#af5f00255&| 
+0#0000000&|m+0#00e0e07&|a|t|c|h|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@53
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|m+0#00e0e07&|a|t|c|h|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@60
-@57|9|1|,|1| @9|3@1|%| 
+@57|9|1|,|1| @9|3|2|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_06.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_06.dump
index 7a1a7c3cd..40b132299 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_06.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_06.dump
@@ -17,4 +17,4 @@
 @75
 |l+0#af5f00255&|e|t| +0#0000000&|s|u|b|s|t|i|t|u|t|e| |=+0#af5f00255&| 
+0#0000000&|s+0#00e0e07&|u|b|s|t|i|t|u|t|e|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@43
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|s+0#00e0e07&|u|b|s|t|i|t|u|t|e|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@55
-@57|1|0|9|,|1| @8|4|0|%| 
+@57|1|0|9|,|1| @8|3|9|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_07.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_07.dump
index e5699bfcd..8e4c2494b 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_07.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_07.dump
@@ -17,4 +17,4 @@
 @75
 |l+0#af5f00255&|e|t| +0#0000000&|u|n|i|q| |=+0#af5f00255&| 
+0#0000000&|u+0#00e0e07&|n|i|q|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@55
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|u+0#00e0e07&|n|i|q|(+0#e000e06&|4+0#e000002&|2|)+0#e000e06&| 
+0#0000000&@61
-@57|1|2|7|,|1| @8|4|7|%| 
+@57|1|2|7|,|1| @8|4|6|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_08.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_08.dump
index a79ec4a29..655a8cc14 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_08.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_08.dump
@@ -17,4 +17,4 @@
 @75
 |l+0#af5f00255&|e|t| +0#0000000&|e|c|h|o| |=+0#af5f00255&| 
+0#0000000&|e+0#ffffff16#ff404010|c|h|o|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@55
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|e+0#ffffff16#ff404010|c|h|o|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@61
-@57|1|4|5|,|0|-|1| @6|5|4|%| 
+@57|1|4|5|,|0|-|1| @6|5|3|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_09.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_09.dump
index 51c26b1ef..ee2a46931 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_09.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_09.dump
@@ -17,4 +17,4 @@
 |e+0#af5f00255&|c|h|o| 
+0#0000000&|(+0#e000e06&|F+0#0000001#ffff4012|o@1|(+0#e000e06#ffffff0|)@1| 
+0#0000000&@62
 |e+0#af5f00255&|c|h|o| 
+0#0000000&|F+0#0000001#ffff4012|o@1|(+0#e000e06#ffffff0|)| 
+0#0000000&|++0#af5f00255&| +0#0000000&|b|a|r| @58
 |e+0#af5f00255&|c|h|o| +0#0000000&|b|a|r| |++0#af5f00255&| 
+0#0000000&|F+0#0000001#ffff4012|o@1|(+0#e000e06#ffffff0|)| +0#0000000&@58
-@57|1|6|3|,|0|-|1| @6|6|1|%| 
+@57|1|6|3|,|0|-|1| @6|6|0|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_10.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_10.dump
index d03cba26d..867bb0d3a 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_10.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_10.dump
@@ -17,4 +17,4 @@
 @75
 |l+0#af5f00255&|e|t| +0#0000000&|f|o@1| |=+0#af5f00255&| 
+0#0000000&|t+0#00e0e07&|:|f+0#0000001#ffff4012|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@55
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|t+0#00e0e07&|:|f+0#0000001#ffff4012|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@60
-@57|1|8|1|,|1| @8|6|8|%| 
+@57|1|8|1|,|1| @8|6|7|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_11.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_11.dump
index 129481a62..09576638a 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_11.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_11.dump
@@ -17,4 +17,4 @@
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@55
 @75
 |l+0#af5f00255&|e|t| +0#0000000&|f|o@1| |=+0#af5f00255&| 
+0#0000000&|g+0#00e0e07&|:|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@48
-@57|1|9@1|,|1| @8|7|5|%| 
+@57|1|9@1|,|1| @8|7|4|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_12.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_12.dump
index e1eca5369..e4a47d383 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_12.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_12.dump
@@ -17,4 +17,4 @@
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|a+0#00e0e07&|:|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@53
 @75
 |l+0#af5f00255&|e|t| +0#0000000&|f|o@1| |=+0#af5f00255&| 
+0#0000000&|v+0#00e0e07&|:|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|4+0#e000002&|2|)+0#e000e06&|
 +0#0000000&@48
-@57|2|1|7|,|0|-|1| @6|8|2|%| 
+@57|2|1|7|,|0|-|1| @6|8|1|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_13.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_13.dump
index 93b8786bb..ef1fca471 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_13.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_13.dump
@@ -17,4 +17,4 @@
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|w+0#00e0e07&|:|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)|
 +0#0000000&@55
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|t+0#00e0e07&|:|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)|
 +0#0000000&@55
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|l+0#00e0e07&|:|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)|
 +0#0000000&@55
-@57|2|3|5|,|1| @8|8|9|%| 
+@57|2|3|5|,|1| @8|8@1|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_14.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_14.dump
index 0bd6a01dc..b5d23c07f 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_14.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_14.dump
@@ -17,4 +17,4 @@
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|g+0#00e0e07&|:|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|#|s|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)|
 +0#0000000&@44
 @75
 @75
-@57|2|5|3|,|0|-|1| @6|9|6|%| 
+@57|2|5|3|,|0|-|1| @6|9|5|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_function_call_15.dump 
b/runtime/syntax/testdir/dumps/vim_function_call_15.dump
index 58b6f9c6b..a932e5fb8 100644
--- a/runtime/syntax/testdir/dumps/vim_function_call_15.dump
+++ b/runtime/syntax/testdir/dumps/vim_function_call_15.dump
@@ -2,11 +2,13 @@
 |"+0#0000e05&| |c|h|a|i|n|e|d| |f|u|n|c|t|i|o|n| |c|a|l@1|s| +0#0000000&@50
 @75
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|)|.+0#af5f00255&|b+0#0000001#ffff4012|a|r|(+0#e000e06#ffffff0|)|
 +0#0000000&@51
-@75
+|c+0#af5f00255&|a|l@1| 
+0#0000000&|m+0#0000001#ffff4012|o|d|u|l|e|.|f|o@1|(+0#e000e06#ffffff0|)|.+0#af5f00255&|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)|
 +0#0000000&@44
 > @74
+@75
 |"+0#0000e05&| |I|s@1|u|e| |#|1|7@1|6@1| |(|v|a|l|i|d| |f|u|n|c|t|i|o|n| 
|c|a|l@1| |h|i|g|h|l|i|g|h|t|e|d| |a|s| |e|r@1|o|r|)| +0#0000000&@17
 || @73
 |c+0#af5f00255&|a|l@1| 
+0#0000000&|m|o|d|u|l|e|[|0+0#e000002&|]+0#0000000&|.+0#af5f00255&|f+0#0000001#ffff4012|o@1|(+0#e000e06#ffffff0|)|
 +0#0000000&@54
+|c+0#af5f00255&|a|l@1| 
+0#0000000&|m|o|d|u|l|e|[|0+0#e000002&|]+0#0000000&|.+0#af5f00255&|s+0#0000001#ffff4012|u|b|s|t|i|t|u|t|e|(+0#e000e06#ffffff0|)|
 +0#0000000&@47
 @75
 |~+0#4040ff13&| @73
 |~| @73
@@ -15,6 +17,4 @@
 |~| @73
 |~| @73
 |~| @73
-|~| @73
-|~| @73
 | +0#0000000&@56|2|7|1|,|0|-|1| @6|B|o|t| 
diff --git a/runtime/syntax/testdir/input/vim9_function_call.vim 
b/runtime/syntax/testdir/input/vim9_function_call.vim
index b70f58da0..751295025 100644
--- a/runtime/syntax/testdir/input/vim9_function_call.vim
+++ b/runtime/syntax/testdir/input/vim9_function_call.vim
@@ -297,6 +297,7 @@ g:substitute#substitute()
 # chained function calls
 
 module.foo().bar()
+module.foo().substitute()
 
 
 # Issue 16721 (Vim script highlight of builtin function after |)
@@ -312,4 +313,5 @@ if !isdirectory(&directory) | mkdir(&directory, "p") | endif
 # Issue #17766 (valid function call highlighted as error)
 
 module[0].foo()
+module[0].substitute()
 
diff --git a/runtime/syntax/testdir/input/vim_ex_eval.vim 
b/runtime/syntax/testdir/input/vim_ex_eval.vim
new file mode 100644
index 000000000..ea9d314b4
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_eval.vim
@@ -0,0 +1,14 @@
+" Vim :eval command
+
+
+eval "Foo"->append(0)
+
+eval "Foo"
+      \ ->append(
+      \ 0
+      \ )
+
+eval "Foo"->append(0) | echo "Foo"
+
+echo "Foo" | eval "Foo"->append(0)
+
diff --git a/runtime/syntax/testdir/input/vim_function_call.vim 
b/runtime/syntax/testdir/input/vim_function_call.vim
index f2e2d8b7b..50e4a3bf3 100644
--- a/runtime/syntax/testdir/input/vim_function_call.vim
+++ b/runtime/syntax/testdir/input/vim_function_call.vim
@@ -267,9 +267,11 @@ call g:substitute#substitute()
 " chained function calls
 
 call module.foo().bar()
+call module.foo().substitute()
 
 
 " Issue #17766 (valid function call highlighted as error)
 
 call module[0].foo()
+call module[0].substitute()
 
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index c1db3ff4e..c6f3943d2 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -2,7 +2,7 @@
 " Language:       Vim script
 " Maintainer:     Hirohito Higashi <h.east.727 ATMARK gmail.com>
 "         Doug Kearns <dougkea...@gmail.com>
-" Last Change:    2025 Jul 17
+" Last Change:    2025 Jul 18
 " Former Maintainer: Charles E. Campbell
 
 " DO NOT CHANGE DIRECTLY.
@@ -33,17 +33,29 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell
 
 " regular vim commands {{{2
 " GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand 
contained', END_STR='nextgroup=vimBang'
-syn keyword vimCommand contained al[l] ar[gs] arga[dd] argd[elete] argdo 
argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] 
bN[ext] ba[ll] bad[d] balt bd[elete] bf[irst] bl[ast] bm[odified] bn[ext] 
bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] buffers bufd[o] 
bun[load] bw[ipeout] c[hange] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] 
caddf[ile] caf[ter] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo 
ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] 
chd[ir] changes che[ckpath] checkt[ime] chi[story] cl[ist] clip[reset] cla[st] 
clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] co[py] col[der] colo[rscheme] 
com[mand] comc[lear] comp[iler] con[tinue] cons[t] cope[n] cp[revious] cpf[ile] 
nextgroup=vimBang
-syn keyword vimCommand contained cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] 
d[elete] delm[arks] deb[ug] defc[ompile] defe[r] di[splay] dif[fupdate] 
diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] 
disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] 
em[enu] endfo[r] endt[ry] endw[hile] ene[w] ev[al] ex exi[t] exu[sage] f[ile] 
files fin[d] fina[lly] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] 
foldd[oopen] folddoc[losed] foldo[pen] g[lobal] go[to] gu[i] gv[im] h[elp] 
helpc[lose] helpf[ind] helpt[ags] ha[rdcopy] hi[ghlight] his[tory] ij[ump] 
il[ist] int[ro] ip[ut] is[earch] isp[lit] j[oin] ju[mps] l[ist] lN[ext] 
lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] 
lat[er] lb[uffer] lbe[fore] nextgroup=vimBang
-syn keyword vimCommand contained lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] 
lcs[cope] ld[o] le[ft] lex[pr] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] 
lgete[xpr] lgr[ep] lgrepa[dd] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] 
lnew[er] lnf[ile] lo[adview] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] 
lr[ewind] lt[ag] lw[indow] ls m[ove] marks menut[ranslate] mes[sages] mk[exrc] 
mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] n[ext] nb[key] nbc[lose] 
nbs[tart] noh[lsearch] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] 
p[rint] pa[ckadd] packl[oadall] pb[uffer] pc[lose] ped[it] po[p] pp[op] 
pre[serve] prev[ious] pro[mptfind] promptr[epl] ps[earch] pt[ag] ptN[ext] 
ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] 
pw[d] q[uit] nextgroup=vimBang
-syn keyword vimCommand contained quita[ll] qa[ll] r[ead] rec[over] red[o] 
redr[aw] redraws[tatus] redrawt[abline] redrawtabp[anel] reg[isters] res[ize] 
ret[ab] rew[ind] ri[ght] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] 
rv[iminfo] sN[ext] sa[rgument] sal[l] sav[eas] sb[uffer] sbN[ext] sba[ll] 
sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] scr[iptnames] 
scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] 
sh[ell] sim[alt] sig[n] sla[st] sn[ext] so[urce] sp[lit] spe[llgood] 
spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] 
spr[evious] sre[wind] st[op] sta[g] star[tinsert] startg[replace] 
startr[eplace] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] 
sw[apname] synti[me] sync[bind] smi[le] nextgroup=vimBang
-syn keyword vimCommand contained t tN[ext] ta[g] tags tabc[lose] tabd[o] 
tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] 
tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] te[aroff] ter[minal] 
tf[irst] tj[ump] tl[ast] tn[ext] tp[revious] tr[ewind] try ts[elect] u[ndo] 
undoj[oin] undol[ist] unh[ide] unlo[ckvar] up[date] v[global] ve[rsion] 
vi[sual] vie[w] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] 
winc[md] wind[o] winp[os] wl[restore] wn[ext] wp[revious] wq wqa[ll] wu[ndo] 
wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep 
delp delep deletp deletep a i nextgroup=vimBang
+syn keyword vimCommand contained al[l] ar[gs] arga[dd] argd[elete] argdo 
argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] 
bN[ext] ba[ll] bad[d] balt bd[elete] bf[irst] bl[ast] bm[odified] bn[ext] 
bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] bro[wse] 
buffers bufd[o] bun[load] bw[ipeout] c[hange] cN[ext] cNf[ile] cabo[ve] 
cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cb[uffer] cbe[fore] cbel[ow] 
cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] 
cg[etfile] cgetb[uffer] cgete[xpr] changes che[ckpath] checkt[ime] chi[story] 
cl[ist] clip[reset] cla[st] clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] 
col[der] colo[rscheme] com[mand] comc[lear] comp[iler] con[tinue] conf[irm] 
cons[t] cope[n] cp[revious] cpf[ile] nextgroup=vimBang
+syn keyword vimCommand contained cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] 
delm[arks] deb[ug] defc[ompile] defe[r] di[splay] dif[fupdate] diffg[et] 
diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] 
dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] em[enu] endfo[r] 
endt[ry] endw[hile] ene[w] ex exi[t] exu[sage] f[ile] files fin[d] fina[lly] 
fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] 
foldo[pen] g[lobal] go[to] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] 
helpt[ags] ha[rdcopy] hi[ghlight] his[tory] ij[ump] il[ist] int[ro] ip[ut] 
is[earch] isp[lit] ju[mps] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] 
lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] 
lbel[ow] lbo[ttom] nextgroup=vimBang
+syn keyword vimCommand contained lc[d] lch[dir] lcl[ose] lcs[cope] ld[o] 
le[ft] lex[pr] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] 
lgr[ep] lgrepa[dd] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] 
lnf[ile] lo[adview] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] 
lt[ag] lw[indow] ls m[ove] marks menut[ranslate] mes[sages] mk[exrc] 
mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] n[ext] nb[key] nbc[lose] 
nbs[tart] noh[lsearch] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] 
p[rint] pa[ckadd] packl[oadall] pb[uffer] pc[lose] ped[it] po[p] pp[op] 
pre[serve] prev[ious] pro[mptfind] promptr[epl] ps[earch] pt[ag] ptN[ext] 
ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] 
pw[d] q[uit] quita[ll] qa[ll] nextgroup=vimBang
+syn keyword vimCommand contained r[ead] rec[over] red[o] redr[aw] 
redraws[tatus] redrawt[abline] redrawtabp[anel] reg[isters] res[ize] ret[ab] 
rew[ind] ri[ght] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] rv[iminfo] 
sN[ext] sa[rgument] sal[l] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] 
sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] scr[iptnames] 
scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] 
sh[ell] sim[alt] sig[n] sla[st] sn[ext] so[urce] spe[llgood] spelld[ump] 
spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] 
sre[wind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] 
stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] synti[me] 
sync[bind] smi[le] t tN[ext] ta[g] tags tabc[lose] nextgroup=vimBang
+syn keyword vimCommand contained tabd[o] tabe[dit] tabf[ind] tabfir[st] 
tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] 
tabr[ewind] tabs tc[d] tch[dir] te[aroff] ter[minal] tf[irst] tj[ump] tl[ast] 
tn[ext] tp[revious] tr[ewind] try ts[elect] u[ndo] undoj[oin] undol[ist] 
unh[ide] unlo[ckvar] up[date] v[global] ve[rsion] vi[sual] vie[w] viu[sage] 
vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] winc[md] wind[o] winp[os] 
wl[restore] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] 
xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp 
deletep a i nextgroup=vimBang
+
+" Lower priority :syn-match to allow for :command/function() distinction
+syn match vimCommand "\<chd\%[ir]\>"    nextgroup=vimBang
+syn match vimCommand "\<co\%[py]\>"     nextgroup=vimBang
+syn match vimCommand "\<d\%[elete]\>"   nextgroup=vimBang
+syn match vimCommand "\<j\%[oin]\>"     nextgroup=vimBang
+syn match vimCommand "\<sp\%[lit]\>"    nextgroup=vimBang
+syn match vimCommand "\<sw\%[apname]\>" nextgroup=vimBang
 
 " GEN_SYN_VIM: vimCommand modifier, START_STR='syn keyword 
vimCommandModifier', END_STR='skipwhite 
nextgroup=vimCommandModifierBang,@vimCmdList'
-syn keyword vimCommandModifier abo[veleft] bel[owright] bo[tright] bro[wse] 
conf[irm] hid[e] hor[izontal] kee[pmarks] keepj[umps] keepp[atterns] keepa[lt] 
lefta[bove] leg[acy] loc[kmarks] noa[utocmd] nos[wapfile] rightb[elow] 
san[dbox] sil[ent] tab to[pleft] uns[ilent] verb[ose] vert[ical] vim9[cmd] 
skipwhite nextgroup=vimCommandModifierBang,@vimCmdList
+syn keyword vimCommandModifier abo[veleft] bel[owright] bo[tright] hid[e] 
hor[izontal] kee[pmarks] keepj[umps] keepp[atterns] keepa[lt] lefta[bove] 
leg[acy] loc[kmarks] noa[utocmd] nos[wapfile] rightb[elow] san[dbox] sil[ent] 
tab to[pleft] uns[ilent] verb[ose] vert[ical] vim9[cmd] skipwhite 
nextgroup=vimCommandModifierBang,@vimCmdList
 " :filter is handled specially elsewhere
 syn match      vimCommandModifierBang  contained       " \@1<=!"       
skipwhite nextgroup=@vimCmdList
 
+" Lower priority :syn-match to allow for :command/function() distinction
+syn match vimCommand "\<bro\%[wse]\>"  skipwhite 
nextgroup=vimCommandModifierBang,@vimCmdList
+syn match vimCommand "\<conf\%[irm]\>" skipwhite 
nextgroup=vimCommandModifierBang,@vimCmdList
+
 " Lower priority for _new_ to distinguish constructors from the command.
 syn match   vimCommand contained       "\<new\>(\@!"
 syn match   vimCommand contained       "\<z[-+^.=]\=\>"
@@ -284,7 +296,7 @@ syn match   vimNumber       
'\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*'    skipwhite nextgroup=@vi
 syn case match
 
 " All vimCommands are contained by vimIsCommand. {{{2
-syn cluster vimCmdList 
contains=vimAbb,vimAddress,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSynColor,vimSynLink,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl
+syn cluster vimCmdList 
contains=vimAbb,vimAddress,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSynColor,vimSynLink,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl
 syn cluster vim9CmdList        
contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var
 syn match vimCmdSep    "\\@1<!|"       skipwhite 
nextgroup=@vimCmdList,vimSubst1,@vimFunc
 syn match vimCmdSep    ":\+"   skipwhite nextgroup=@vimCmdList,vimSubst1
@@ -1303,6 +1315,16 @@ syn region       vimExecute
       \ contains=@vimContinue,@vimExprList
       \ transparent
 
+syn region     vimEval
+      \ matchgroup=vimCommand
+      \ start="\<ev\%[al]\>"
+      \ skip=+\|\|||\|
\s*\%(\\|["#]\ \)+
+      \ end="\ze|"
+      \ excludenl end="$"
+      \ nextgroup=vimCmdSep
+      \ contains=@vimContinue,@vimExprList
+      \ transparent
+
 " Filter: {{{2
 " ======
 syn match      vimExFilter             "\<filt\%[er]\>"        skipwhite 
nextgroup=vimExFilterBang,vimExFilterPattern
@@ -2129,7 +2151,7 @@ unlet s:interfaces
 " (following Gautam Iyer's suggestion)
 " ==========================
 syn match      vimFunc contained       "\<\l\w*\ze\s*("                        
        skipwhite nextgroup=vimOperParen contains=vimFuncName
-syn match      vimUserFunc     contained       "\.\@1<=\l\w*\ze\s*("           
        skipwhite nextgroup=vimOperParen contains=vimFuncName
+syn match      vimUserFunc     contained       "\.\@1<=\l\w*\ze\s*("           
        skipwhite nextgroup=vimOperParen
 syn match      vimUserFunc     contained       
"\<\%([[:upper:]_]\|\%(\h\w*\.\)\+\h\)\w*\ze\s*("               skipwhite 
nextgroup=vimOperParen contains=vim9MethodName,vim9Super,vim9This
 syn match      vimUserFunc     contained       
"\<\%(g:\)\=\%(\h\w*#\)\+\h\w*\ze\s*("          skipwhite 
nextgroup=vimOperParen contains=vimVarScope
 syn match      vimUserFunc     contained       
"\%(\<[sgbwtlav]:\|<[sS][iI][dD]>\)\%(\h\w*\.\)*\h\w*\ze\s*("   skipwhite 
nextgroup=vimOperParen contains=vimVarScope,vimNotation
@@ -2286,6 +2308,7 @@ if !exists("skip_vim_syntax_inits")
  hi def link vimEnvvar PreProc
  hi def link vimError  Error
  hi def link vimEscape Special
+ hi def link vimEval   vimCommand
  hi def link vimExFilter       vimCommand
  hi def link vimExFilterBang   vimBang
  hi def link vimExMark vimCommand

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1ucpc0-00Ddkx-Tk%40256bit.org.

Raspunde prin e-mail lui