mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
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>
This commit is contained in:
committed by
Christian Brabandt
parent
b5459ee104
commit
adb703e1b9
@ -526,7 +526,7 @@ if s:vim9script
|
||||
\ 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 s:vim9script
|
||||
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
|
||||
|
Reference in New Issue
Block a user