Parse PHP final functions (fixes #3111171).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5417 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2010-11-18 18:20:12 +00:00
parent 554f1b0526
commit 9c94b5b3a4
2 changed files with 5 additions and 2 deletions

View File

@ -9,6 +9,8 @@
Don't change default build command entry color when cancelling
label editing.
Make dialogs_show_input() return NULL when cancelled.
* tagmanager/php.c:
Parse PHP final functions (fixes #3111171).
2010-11-17 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>

View File

@ -79,9 +79,10 @@ static void installPHPRegex (const langType language)
"\\1", "m,macro,macros", NULL);
addTagRegex(language, "^[ \t]*const[ \t]*([" ALPHA "_][" ALNUM "_]*)[ \t]*[=;]",
"\\1", "m,macro,macros", NULL);
/* Note: Using [] to match words is wrong, but using () doesn't seem to match 'function' on its own */
addCallbackRegex(language,
"^[ \t]*[(public|protected|private|static)[ \t]*]*[ \t]*function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)[[:space:]]*(\\(.*\\))",
NULL, function_cb);
"^[ \t]*[(public|protected|private|static|final)[ \t]*]*[ \t]*function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)[[:space:]]*(\\(.*\\))",
NULL, function_cb);
addTagRegex(language, "^[ \t]*(\\$|::\\$|\\$this->)([" ALPHA "_][" ALNUM "_]*)[ \t]*=",
"\\2", "v,variable,variables", NULL);
addTagRegex(language, "^[ \t]*((var|public|protected|private|static)[ \t]+)+\\$([" ALPHA "_][" ALNUM "_]*)[ \t]*[=;]",