Skip to content

Commit

Permalink
Merge pull request #151 from mattn/signatures
Browse files Browse the repository at this point in the history
Add perl_no_subprototype_error for perl's new feature 'signatures'
  • Loading branch information
hoelzro committed Feb 26, 2014
2 parents 9feba09 + 74ab089 commit 3eddc30
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions syntax/perl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3eddc30

Please sign in to comment.