Skip to content

Commit

Permalink
feat: Optimise PHP function parameter regex
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoomen committed Jun 23, 2019
1 parent f199188 commit cec1cb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ftplugin/php.vim
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ call add(b:doge_patterns, {
\ 'match': '\m^\%(\%(public\|private\|protected\|static\|final\)\s\+\)*function\s*\([^(]\+\)\s*(\(.\{-}\))\s*{',
\ 'match_group_names': ['funcName', 'parameters'],
\ 'parameters': {
\ 'match': '\m\%(\([[:alnum:]_\\]\+\)\s\+\)\?&\?\($[[:alnum:]_]\+\)\%(\s*=\s*[^,]\+\)\?',
\ 'match': '\m\%(\([[:alnum:]_\\]\+\)\s\+\)\?&\?\($[[:alnum:]_]\+\)\%(\s*=\s*\%([[:alnum:]_]\+(.\{-})\|[^,]\+\)\+\)\?',
\ 'match_group_names': ['type', 'name'],
\ 'format': ['@param {type|mixed} {name} TODO'],
\ },
Expand Down

0 comments on commit cec1cb8

Please sign in to comment.