[100030] trunk/dports/devel/ctags

ryandesign at macports.org ryandesign at macports.org
Sat Nov 24 14:27:09 PST 2012


Revision: 100030
          https://trac.macports.org/changeset/100030
Author:   ryandesign at macports.org
Date:     2012-11-24 14:27:09 -0800 (Sat, 24 Nov 2012)
Log Message:
-----------
ctags: apply upstream patches to improve php parser (#29509)

Modified Paths:
--------------
    trunk/dports/devel/ctags/Portfile

Added Paths:
-----------
    trunk/dports/devel/ctags/files/
    trunk/dports/devel/ctags/files/patch-php.c.diff

Modified: trunk/dports/devel/ctags/Portfile
===================================================================
--- trunk/dports/devel/ctags/Portfile	2012-11-24 21:47:25 UTC (rev 100029)
+++ trunk/dports/devel/ctags/Portfile	2012-11-24 22:27:09 UTC (rev 100030)
@@ -4,6 +4,7 @@
 
 name             ctags
 version          5.8
+revision         1
 categories       devel
 maintainers      mww openmaintainer
 license          GPL-2
@@ -24,6 +25,9 @@
 checksums           md5     c00f82ecdcc357434731913e5b48630d \
                     sha1    482da1ecd182ab39bbdc09f2f02c9fba8cd20030 \
                     rmd160  191495869fbfa2f77a9619a4920eba26d02eface
+
+patchfiles          patch-php.c.diff
+
 configure.args   --enable-macro-patterns \
                  --mandir=\\\${prefix}/share/man \
                  --with-readlib

Added: trunk/dports/devel/ctags/files/patch-php.c.diff
===================================================================
--- trunk/dports/devel/ctags/files/patch-php.c.diff	                        (rev 0)
+++ trunk/dports/devel/ctags/files/patch-php.c.diff	2012-11-24 22:27:09 UTC (rev 100030)
@@ -0,0 +1,34 @@
+http://ctags.svn.sourceforge.net/viewvc/ctags?view=revision&revision=729 ("update PHP parser to ignore comments (95% solution)")
+http://ctags.svn.sourceforge.net/viewvc/ctags?view=revision&revision=734 ("classes can be final")
+--- php.c	(revision 728)
++++ php.c	(revision 734)
+@@ -64,18 +64,18 @@
+ 
+ static void installPHPRegex (const langType language)
+ {
+-	addTagRegex(language, "(^|[ \t])class[ \t]+([" ALPHA "_][" ALNUM "_]*)",
+-		"\\2", "c,class,classes", NULL);
+-	addTagRegex(language, "(^|[ \t])interface[ \t]+([" ALPHA "_][" ALNUM "_]*)",
+-		"\\2", "i,interface,interfaces", NULL);
+-	addTagRegex(language, "(^|[ \t])define[ \t]*\\([ \t]*['\"]?([" ALPHA "_][" ALNUM "_]*)",
+-		"\\2", "d,define,constant definitions", NULL);
+-	addTagRegex(language, "(^|[ \t])function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)",
+-		"\\2", "f,function,functions", NULL);
+-	addTagRegex(language, "(^|[ \t])(\\$|::\\$|\\$this->)([" ALPHA "_][" ALNUM "_]*)[ \t]*=",
++	addTagRegex(language, "^[ \t]*((final|abstract)[ \t]+)*class[ \t]+([" ALPHA "_][" ALNUM "_]*)",
++		"\\3", "c,class,classes", NULL);
++	addTagRegex(language, "^[ \t]*interface[ \t]+([" ALPHA "_][" ALNUM "_]*)",
++		"\\1", "i,interface,interfaces", NULL);
++	addTagRegex(language, "^[ \t]*define[ \t]*\\([ \t]*['\"]?([" ALPHA "_][" ALNUM "_]*)",
++		"\\1", "d,define,constant definitions", NULL);
++	addTagRegex(language, "^[ \t]*((static|public|protected|private)[ \t]+)*function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)",
++		"\\3", "f,function,functions", NULL);
++	addTagRegex(language, "^[ \t]*(\\$|::\\$|\\$this->)([" ALPHA "_][" ALNUM "_]*)[ \t]*=",
++		"\\2", "v,variable,variables", NULL);
++	addTagRegex(language, "^[ \t]*((var|public|protected|private|static)[ \t]+)+\\$([" ALPHA "_][" ALNUM "_]*)[ \t]*[=;]",
+ 		"\\3", "v,variable,variables", NULL);
+-	addTagRegex(language, "(^|[ \t])(var|public|protected|private|static)[ \t]+\\$([" ALPHA "_][" ALNUM "_]*)[ \t]*[=;]",
+-		"\\3", "v,variable,variables", NULL);
+ 
+ 	/* function regex is covered by PHP regex */
+ 	addTagRegex (language, "(^|[ \t])([A-Za-z0-9_]+)[ \t]*[=:][ \t]*function[ \t]*\\(",
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121124/a9d60075/attachment.html>


More information about the macports-changes mailing list