SF.net SVN: geany:[5417] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Nov 18 18:20:12 UTC 2010


Revision: 5417
          http://geany.svn.sourceforge.net/geany/?rev=5417&view=rev
Author:   ntrel
Date:     2010-11-18 18:20:12 +0000 (Thu, 18 Nov 2010)

Log Message:
-----------
Parse PHP final functions (fixes #3111171).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tagmanager/php.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-11-18 17:51:15 UTC (rev 5416)
+++ trunk/ChangeLog	2010-11-18 18:20:12 UTC (rev 5417)
@@ -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>

Modified: trunk/tagmanager/php.c
===================================================================
--- trunk/tagmanager/php.c	2010-11-18 17:51:15 UTC (rev 5416)
+++ trunk/tagmanager/php.c	2010-11-18 18:20:12 UTC (rev 5417)
@@ -79,9 +79,10 @@
 		"\\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]*[=;]",


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list