Browse Source

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
pull/8788/head
Don HO 4 years ago
parent
commit
38037035e4
  1. 4
      PowerEditor/Test/FunctionList/perl/unitTest
  2. 2
      PowerEditor/Test/FunctionList/perl/unitTest.expected.result
  3. 6
      PowerEditor/src/functionList.xml

4
PowerEditor/Test/FunctionList/perl/unitTest

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

2
PowerEditor/Test/FunctionList/perl/unitTest.expected.result

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

6
PowerEditor/src/functionList.xml

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

Loading…
Cancel
Save