Ticket #29509: ctags.patch

File ctags.patch, 3.3 KB (added by singingwolfboy@…, 13 years ago)
  • ctags/files/php-lang.patch

     
     1--- php.c.orig  2007-12-28 11:40:08.000000000 -0500
     2+++ php.c       2011-05-19 13:48:22.000000000 -0400
     3@@ -11,6 +11,8 @@
     4 *   variables.
     5 *
     6 *   Parsing PHP defines by Pavel Hlousek <pavel.hlousek@seznam.cz>, Apr 2003.
     7+*   Multiline comment fixes by David Mudrak <david.mudrak@gmail.com>, Jul 2009
     8+*      based on a patches by Sander Marechal <s.marechal@jejik.com>, Nov 2008.
     9 */
     10 
     11 /*
     12@@ -64,17 +66,17 @@
     13 
     14 static void installPHPRegex (const langType language)
     15 {
     16-       addTagRegex(language, "(^|[ \t])class[ \t]+([" ALPHA "_][" ALNUM "_]*)",
     17-               "\\2", "c,class,classes", NULL);
     18-       addTagRegex(language, "(^|[ \t])interface[ \t]+([" ALPHA "_][" ALNUM "_]*)",
     19+    addTagRegex(language, "(^[ \t]*)(abstract[ \t]+)?class[ \t]+([" ALPHA "_][" ALNUM "_]*)",
     20+        "\\3", "c,class,classes", NULL);
     21+    addTagRegex(language, "(^[ \t]*)interface[ \t]+([" ALPHA "_][" ALNUM "_]*)",
     22                "\\2", "i,interface,interfaces", NULL);
     23-       addTagRegex(language, "(^|[ \t])define[ \t]*\\([ \t]*['\"]?([" ALPHA "_][" ALNUM "_]*)",
     24+       addTagRegex(language, "(^[ \t]*)define[ \t]*\\([ \t]*['\"]?([" ALPHA "_][" ALNUM "_]*)",
     25                "\\2", "d,define,constant definitions", NULL);
     26-       addTagRegex(language, "(^|[ \t])function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)",
     27-               "\\2", "f,function,functions", NULL);
     28-       addTagRegex(language, "(^|[ \t])(\\$|::\\$|\\$this->)([" ALPHA "_][" ALNUM "_]*)[ \t]*=",
     29+    addTagRegex(language, "(^[ \t]*)(public[ \t]+|protected[ \t]+|private[ \t]+)?(static[ \t]+)?function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)",
     30+               "\\4", "f,function,functions", NULL);
     31+       addTagRegex(language, "(^[ \t]*)(\\$|::\\$|\\$this->)([" ALPHA "_][" ALNUM "_]*)[ \t]*=",
     32                "\\3", "v,variable,variables", NULL);
     33-       addTagRegex(language, "(^|[ \t])(var|public|protected|private|static)[ \t]+\\$([" ALPHA "_][" ALNUM "_]*)[ \t]*[=;]",
     34+       addTagRegex(language, "(^[ \t]*)(var|public|protected|private|static)[ \t]+\\$([" ALPHA "_][" ALNUM "_]*)[ \t]*[=;]",
     35                "\\3", "v,variable,variables", NULL);
     36 
     37        /* function regex is covered by PHP regex */
     38@@ -89,7 +91,7 @@
     39 /* Create parser definition structure */
     40 extern parserDefinition* PhpParser (void)
     41 {
     42-       static const char *const extensions [] = { "php", "php3", "phtml", NULL };
     43+       static const char *const extensions [] = { "php", "php3", "php4", "php5", "phtml", NULL };
     44        parserDefinition* def = parserNew ("PHP");
     45        def->extensions = extensions;
     46        def->initialize = installPHPRegex;
  • ctags/Portfile

     
    44
    55name             ctags
    66version          5.8
     7revision         1
    78categories       devel
    89maintainers      mww openmaintainer
    910license          GPLv2
     
    2425checksums           md5     c00f82ecdcc357434731913e5b48630d \
    2526                    sha1    482da1ecd182ab39bbdc09f2f02c9fba8cd20030 \
    2627                    rmd160  191495869fbfa2f77a9619a4920eba26d02eface
     28patchfiles       php-lang.patch
    2729configure.args   --enable-macro-patterns \
    2830                 --mandir=\\\${prefix}/share/man \
    2931                 --with-readlib