Skip to content

Commit

Permalink
feat(cpp): Check for 0 or more occurences in the regex pattern instea…
Browse files Browse the repository at this point in the history
…d of making it optional
  • Loading branch information
kkoomen committed Jul 22, 2019
1 parent 7ee3ec6 commit e69ea80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ftplugin/cpp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ call add(b:doge_patterns, {
" template<typename T, typename... Args>
" static T* create(Args&& ... args) {}
call add(b:doge_patterns, {
\ 'match': '\m^\%(\%(template\s*<[[:alnum:][:space:]_<>.,]*>\|const\|inline\)\s\+\)\?\%(static\s\+\)\?\([[:alnum:]_:&*]\+\s*\%(<[[:alnum:][:space:]_<>.,:]\+>\)\?\|[[:alnum:]_]\+(.\{-})\)\s\+\%([[:alnum:]_:]\+\)\s*(\(.\{-}\))\s*[;{]',
\ 'match': '\m^\%(\%(template\s*<[[:alnum:][:space:]_<>.,]*>\|const\|inline\)\s\+\)*\%(static\s\+\)\?\([[:alnum:]_:&*]\+\s*\%(<[[:alnum:][:space:]_<>.,:]\+>\)\?\|[[:alnum:]_]\+(.\{-})\)\s\+\%([[:alnum:]_:]\+\)\s*(\(.\{-}\))\s*[;{]',
\ 'match_group_names': ['returnType', 'parameters'],
\ 'parameters': {
\ 'match': s:parameters_match_pattern,
Expand Down

0 comments on commit e69ea80

Please sign in to comment.