SF.net SVN: geany:[5986] branches/unstable
ntrel at users.sourceforge.net
ntrel at xxxxx
Mon Oct 3 14:14:33 UTC 2011
Revision: 5986
http://geany.svn.sourceforge.net/geany/?rev=5986&view=rev
Author: ntrel
Date: 2011-10-03 14:14:33 +0000 (Mon, 03 Oct 2011)
Log Message:
-----------
Fix parsing keyword-qualified functions strictly, e.g. don't
parse 'staticfunction' or 'fatfunction'.
Modified Paths:
--------------
branches/unstable/ChangeLog
branches/unstable/tagmanager/php.c
Modified: branches/unstable/ChangeLog
===================================================================
--- branches/unstable/ChangeLog 2011-10-02 13:45:14 UTC (rev 5985)
+++ branches/unstable/ChangeLog 2011-10-03 14:14:33 UTC (rev 5986)
@@ -1,3 +1,10 @@
+2011-10-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * tagmanager/php.c:
+ Fix parsing keyword-qualified functions strictly, e.g. don't
+ parse 'staticfunction' or 'fatfunction'.
+
+
2011-09-30 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/utils.c, src/utils.h, src/editor.c:
Modified: branches/unstable/tagmanager/php.c
===================================================================
--- branches/unstable/tagmanager/php.c 2011-10-02 13:45:14 UTC (rev 5985)
+++ branches/unstable/tagmanager/php.c 2011-10-03 14:14:33 UTC (rev 5986)
@@ -79,10 +79,14 @@
"\\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|final)[ \t]*]*[ \t]*function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)[[:space:]]*(\\(.*\\))",
+ "^[ \t]*((public|protected|private|static|final)[ \t]+)+function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)[[:space:]]*(\\(.*\\))",
NULL, function_cb);
+ /* note: using (qualifiers)* instead of (qualifiers)+ in the above regex doesn't seem to
+ * match 'function' on its own, so we handle that separately: */
+ addCallbackRegex(language,
+ "^[ \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