runtime(vim): Update base-syntax, match protected constructors
Support for protected constructors was added in commit 7e89800.
closes: 16618
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 6a21c5f..5ce2a90 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -526,7 +526,7 @@
\ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vim9MethodDefReturnType,vimCommentError
\ contains=vimDefParam,vim9Comment,vimFuncParamEquals
- syn match vim9ConstructorDefName contained "\<new\w*\>"
+ syn match vim9ConstructorDefName contained "\<_\=new\w*\>"
\ nextgroup=vim9ConstructorDefParams
\ contains=@vim9MethodName
syn match vim9ConstructorDefParam contained "\<\%(this\.\)\=\h\w*\>"
@@ -563,14 +563,14 @@
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
syn match vim9MethodNameError contained "\<[a-z0-9]\i\>"
endif
- syn match vim9MethodName contained "\<new\w*\>"
+ syn match vim9MethodName contained "\<_\=new\w*\>"
syn keyword vim9MethodName contained empty len string
syn cluster vim9MethodName contains=vim9MethodName,vim9MethodNameError
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
syn region vim9MethodDefFold contained start="\%(^\s*\%(:\=static\s\+\)\=\)\@16<=:\=def\s\+\h\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent
- syn region vim9MethodDefFold contained start="^\s*:\=def\s\+new\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent
+ syn region vim9MethodDefFold contained start="^\s*:\=def\s\+_\=new\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent
endif
syn cluster vim9MethodDef contains=vim9MethodDef,vim9MethodDefFold