summaryrefslogtreecommitdiffstats
path: root/syntax/perl.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2014-03-01 00:15:51 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2014-03-01 00:15:51 +0100
commit9b3b092d15503ed70ea4bf60c4e1345b196c3677 (patch)
tree45fdb6e08c380ab8bfe0988c66b15ab014688a55 /syntax/perl.vim
parent959a2ffa3ddf3a716b37e15d0034546236a97957 (diff)
downloadvim-polyglot-9b3b092d15503ed70ea4bf60c4e1345b196c3677.tar.gz
vim-polyglot-9b3b092d15503ed70ea4bf60c4e1345b196c3677.zip
Update
Diffstat (limited to 'syntax/perl.vim')
-rw-r--r--syntax/perl.vim6
1 files changed, 4 insertions, 2 deletions
diff --git a/syntax/perl.vim b/syntax/perl.vim
index 61c7dd9b..4b1c89b8 100644
--- a/syntax/perl.vim
+++ b/syntax/perl.vim
@@ -365,8 +365,10 @@ else
syn match perlSubAttributes "" contained nextgroup=perlSubError
syn match perlSubAttributes ":\_s*" contained nextgroup=@perlSubAttrMaybe
endif
-syn match perlSubPrototypeError "(\%(\_s*\%(\%(\\\%([$@%&*]\|\[[$@%&*]\+\]\)\|[$&*]\|[@%]\%(\_s*)\)\@=\|;\%(\_s*[)$@%&*\\]\)\@=\|_\%(\_s*[);]\)\@=\)\_s*\)*\)\@>\zs\_[^)]\+" contained
-syn match perlSubPrototype +(\_[^)]*)\_s*\|+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError
+if !exists("perl_no_subprototype_error") " Set 1 if using signatures feature in perl5.19.9
+ syn match perlSubPrototypeError "(\%(\_s*\%(\%(\\\%([$@%&*]\|\[[$@%&*]\+\]\)\|[$&*]\|[@%]\%(\_s*)\)\@=\|;\%(\_s*[)$@%&*\\]\)\@=\|_\%(\_s*[);]\)\@=\)\_s*\)*\)\@>\zs\_[^)]\+" contained
+ syn match perlSubPrototype +(\_[^)]*)\_s*\|+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError
+endif
syn match perlSubName +\%(\h\|::\|'\w\)\%(\w\|::\|'\w\)*\_s*\|+ contained nextgroup=perlSubPrototype,perlComment
syn match perlFunction +\<sub\>\_s*+ nextgroup=perlSubName