SF.net SVN: geany:[4562] branches/geany-0.18.1

eht16 at users.sourceforge.net eht16 at xxxxx
Mon Jan 25 21:16:17 UTC 2010


Revision: 4562
          http://geany.svn.sourceforge.net/geany/?rev=4562&view=rev
Author:   eht16
Date:     2010-01-25 21:16:16 +0000 (Mon, 25 Jan 2010)

Log Message:
-----------
Backport from trunk:
Improve parsing of PHP functions by requiring a valid modifier or whitespace before the 'function' keyword to ignore some false positives like function tags inside comments (patch by Harold Aling, thanks).

Modified Paths:
--------------
    branches/geany-0.18.1/ChangeLog
    branches/geany-0.18.1/tagmanager/php.c

Modified: branches/geany-0.18.1/ChangeLog
===================================================================
--- branches/geany-0.18.1/ChangeLog	2010-01-25 21:16:07 UTC (rev 4561)
+++ branches/geany-0.18.1/ChangeLog	2010-01-25 21:16:16 UTC (rev 4562)
@@ -1,3 +1,12 @@
+2009-08-25  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * tagmanager/php.c:
+   Improve parsing of PHP functions by requiring a valid modifier or
+   whitespace before the 'function' keyword to ignore some false
+   positives like function tags inside comments
+   (patch by Harold Aling, thanks).
+
+
 2009-08-20  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
 
  * plugins/splitwindow.c:

Modified: branches/geany-0.18.1/tagmanager/php.c
===================================================================
--- branches/geany-0.18.1/tagmanager/php.c	2010-01-25 21:16:07 UTC (rev 4561)
+++ branches/geany-0.18.1/tagmanager/php.c	2010-01-25 21:16:16 UTC (rev 4562)
@@ -76,8 +76,8 @@
 		"\\2", "i,interface,interfaces", NULL);
 	addTagRegex(language, "(^|[ \t])define[ \t]*\\([ \t]*['\"]?([" ALPHA "_][" ALNUM "_]*)",
 		"\\2", "d,macro,constant definitions", NULL);
-	addTagRegex(language, "(^|[ \t])function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)",
-		"\\2", "f,function,functions", NULL);
+	addTagRegex(language, "^[ \t]*((public|protected|private|static)[ \t]+)*function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)",
+		"\\3", "f,function,functions", NULL);
 	addTagRegex(language, "(^|[ \t])(\\$|::\\$|\\$this->)([" ALPHA "_][" ALNUM "_]*)[ \t]*=",
 		"\\3", "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