@@ -619,8 +619,9 @@ if !exists("php_ignore_phpdoc") || !php_ignore_phpdoc
619619
620620 syn region phpDocTags start =" {@\( example\| id\| internal\| inheritdoc\| link\| source\| toc\| tutorial\) " end =" }" containedin =phpDocComment
621621 syn match phpDocTags " @\% (abstract\| access\| api\| author\| brief\| bug\| category\| class\| copyright\| created\| date\| deprecated\| details\| example\| exception\| file\| filesource\| final\| global\| id\| ignore\| inheritdoc\| internal\| license\| link\| magic\| method\| name\| package\| param\| property\| return\| see\| since\| source\| static\| staticvar\| struct\| subpackage\| throws\| toc\| todo\| tutorial\| type\| uses\| var\| version\| warning\) " containedin =phpDocComment nextgroup =phpDocParam,phpDocIdentifier skipwhite contained
622- syn match phpDocParam " \s\+\z s\( |\|\\\|\h\w *\) *\h\w *" nextgroup =phpDocIdentifier skipwhite contained
622+ syn match phpDocParam " \s\+\z s\( |\|\\\|\h\w *\) *\h\w *" nextgroup =phpDocIdentifier skipwhite contained contains = phpDocNamespaceSeparator
623623 syn match phpDocIdentifier " \s\+\z s$\h\w *" contained
624+ syn match phpDocNamespaceSeparator " \\ " contained display
624625
625626 syn case match
626627endif
@@ -693,25 +694,28 @@ syn keyword phpKeyword class contained
693694 \ nextgroup= phpClass skipwhite skipempty
694695syn match phpClass / \h\w */ contained
695696
697+ syn match phpClassNamespaceSeparator " \\ " contained display
698+
696699" Class extends
697700syn keyword phpKeyword extends contained
698701 \ nextgroup= phpClassExtends skipwhite skipempty
699- syn match phpClassExtends / \(\\\|\h\w *\) *\h\w */ contained
702+ syn match phpClassExtends / \(\\\|\h\w *\) *\h\w */ contained contains = phpClassNamespaceSeparator
700703
701704" Class implements
702705syntax keyword phpKeyword implements contained
703706 \ nextgroup= phpClassImplements skipwhite skipempty
704- syntax match phpClassImplements contained
707+ syntax match phpClassImplements contained contains = phpClassNamespaceSeparator
705708 \ nextgroup= phpClassDelimiter skipwhite skipempty /\(\\\|\h\w*\)*\h\w*/
706709syntax match phpClassDelimiter contained
707710 \ nextgroup= phpClassImplements skipwhite skipempty /,/
708711
709712" use statement
713+ syn match phpUseNamespaceSeparator " \\ " contained display
710714syn keyword phpInclude use contained
711715 \ nextgroup= phpUseFunction,phpUseClass skipwhite skipempty
712716syn match phpUseFunction / function\_ s\+\(\\\|\h\w *\) *\h\w */ contained contains =phpUseKeyword
713717 \ nextgroup= phpUseAlias skipwhite skipempty
714- syn match phpUseClass / \( function\_ s\+\)\@ !\(\\\|\h\w *\) *\h\w */ contained
718+ syn match phpUseClass / \( function\_ s\+\)\@ !\(\\\|\h\w *\) *\h\w */ contained contains = phpUseNamespaceSeparator
715719 \ nextgroup= phpUseAlias skipwhite skipempty
716720syn match phpUseAlias / as\_ s\+\h\w */ contained contains =phpUseKeyword
717721syn match phpUseKeyword / \( function\| as\)\_ s\+ / contained contains =phpKeyword
@@ -863,6 +867,10 @@ if !exists("did_php_syn_inits")
863867 hi def link phpClassImplements phpClass
864868 hi def link phpClassDelimiter phpRegion
865869
870+ hi def link phpDocNamespaceSeparator phpComment
871+ hi def link phpClassNamespaceSeparator phpClass
872+ hi def link phpUseNamespaceSeparator phpRegion
873+
866874endif
867875
868876" Cleanup: {{{
0 commit comments