11syntax region jsFlowTypeStatement start =/ type/ end =/ =/ oneline skipwhite skipempty nextgroup =jsFlowTypeObject
22syntax region jsFlowDeclareBlock start =/ declare/ end =/ [;\n ]/ oneline contains =jsFlow,jsFlowDeclareKeyword,jsFlowStorageClass
33syntax region jsFlow start =/ :/ end =/ \% (\% ([),=;\n ]\| {\% (.*}\)\@ !\|\% ({.*}\)\@ <=\s *{\)\@ =\| void\) / contains =@jsFlowCluster oneline skipwhite skipempty nextgroup =jsFuncBlock
4- syntax region jsFlowReturn contained start =/ :/ end =/ \% (\S\s *\% ({\)\@ =\|\n\) / contains =@jsFlowCluster oneline skipwhite skipempty nextgroup =jsFuncBlock keepend
5- syntax region jsFlowTypeObject contained start =/ {/ end =/ }/ skipwhite skipempty nextgroup =jsFunctionBlock extend
4+ syntax region jsFlowReturn contained start =/ :/ end =/ \% (\S\s *\% ({\% (.*}\)\@ !\)\@ =\|\n\) / contains =@jsFlowCluster oneline skipwhite skipempty nextgroup =jsFuncBlock keepend
5+ syntax region jsFlowTypeObject contained start =/ {/ end =/ }/ contains =jsFlowTypeKey skipwhite skipempty nextgroup =jsFunctionBlock extend
6+ syntax match jsFlowTypeKey contained / \< [0-9a-zA-Z_$?]*\>\(\s *:\)\@ =/ skipwhite skipempty nextgroup =jsFlowTypeValue
7+ syntax region jsFlowTypeValue contained matchgroup =jsFlowNoise start =/ :/ end =/ [,}]/ contains =@jsFlowCluster
68syntax region jsFlowObject contained matchgroup =jsFlowNoise start =/ {/ end =/ }/ oneline contains =@jsFlowCluster
79syntax region jsFlowArray contained matchgroup =jsFlowNoise start =/ \[ / end =/ \] / oneline contains =@jsFlowCluster
10+ syntax region jsFlowArrow contained matchgroup =jsFlowNoise start =/ (/ end =/ )\s *=>/ oneline contains =@jsFlowCluster
811syntax keyword jsFlowDeclareKeyword contained declare
912syntax keyword jsFlowType contained boolean number string null void any mixed JSON array function object Array
1013syntax match jsFlowClassProperty contained / \< [0-9a-zA-Z_$]*\> :\@ =/ skipwhite skipempty nextgroup =jsFlow
1114syntax match jsFlowNoise contained / [:;,<>]/
12- syntax cluster jsFlowCluster contains =jsFlowType,jsFlowArray,jsFlowObject,jsFlowNoise
15+ syntax cluster jsFlowCluster contains =jsFlowType,jsFlowArray,jsFlowObject,jsFlowNoise,jsFlowArrow
1316syntax keyword jsFlowStorageClass contained const var let
1417syntax region jsFlowParenRegion contained start =/ :\s *(/ end =/ )\% (\s *:\)\@ =/ oneline contains =@jsFlowCluster skipwhite skipempty nextgroup =jsObjectValue
1518syntax region jsFlowClass contained matchgroup =jsFlowNoise start =/ </ end =/ >/ oneline contains =@jsFlowCluster skipwhite skipempty nextgroup =jsClassBlock
@@ -28,6 +31,9 @@ if version >= 508 || !exists("did_javascript_syn_inits")
2831 HiLink jsFlowObject PreProc
2932 HiLink jsFlowParenRegion PreProc
3033 HiLink jsFlowClass PreProc
34+ HiLink jsFlowTypeObject PreProc
35+ HiLink jsFlowTypeKey PreProc
36+ HiLink jsFlowTypeValue PreProc
3137 HiLink jsFlowClassProperty jsClassProperty
3238 HiLink jsFlowType Type
3339 HiLink jsFlowDeclareKeyword Type
0 commit comments