I'm using ctags on linux to create tags for source code using vim and the Tlist plug-in. The current ctags function parsing for PHP is woeful so i've downloaded the source for ctags and im going to change the regex that parses the functions.
Because i'm dealing with lots of code that has functions declared in many different ways i need a regex to reliably parse the function names properly.
Do you have one you could share that parses a php function name from a line of source code?
This is the current patched and 'improved' one from the ctags source which misses many functions, especially those marked as final
or static
first.
(^[ \t]*)(public[ \t]+|protected[ \t]+|private[ \t]+)?(static[ \t]+)?function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)
[ \t]
should be\s+
.public \n function
is perfectly valid.