Fix some Perl functions not being recognized in function list issue

Fix Perl functions without parentheses / with attributes are not recognized in function list issue.

Fix #4265, close #4266
This commit is contained in:
Don HO 2020-08-29 02:06:06 +02:00
parent f9fa72b9db
commit 38037035e4
3 changed files with 7 additions and 5 deletions

View File

@ -148,6 +148,10 @@ sub VarNames($)
return (@vars);
}
sub functionNoParentheses {
return 1
}
############### Start ###############
print "\npltags $VERSION by Michael Schaap <mscha\@mscha.com>\n\n";

View File

@ -1 +1 @@
{"leaves":["MakeTag","PackageName","SubName","VarNames"],"root":"unitTest"}
{"leaves":["MakeTag","PackageName","SubName","VarNames","functionNoParentheses"],"root":"unitTest"}

View File

@ -651,10 +651,8 @@
sub
\s+
[A-Za-z_]\w*
\s*
\(
[^()]*
\)
(\s*\([^()]*\))? # prototype or signature
(\s*\:\s*[^{]+)? # attributes
\s*\{ # start of class body
"
>