Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 276902 - patch ctags-5.7 for better PHP5 support
Summary: patch ctags-5.7 for better PHP5 support
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Vim Maintainers
URL: http://www.jejik.com/articles/2008/11...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-07 09:57 UTC by David Mudrák
Modified: 2010-04-14 13:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The patch fixes the problem with PHP keywords in multilines comments (ctags-5.7-php-keywords-in-comments.patch,1.65 KB, patch)
2009-07-07 10:00 UTC, David Mudrák
Details | Diff
Implements the useful behaviour that only class member variables are tagged (ctags-5.7-php-class-member-variables-only.patch,745 bytes, patch)
2009-07-07 10:01 UTC, David Mudrák
Details | Diff
Small modification (ctags-5.7-php5-improvements.patch,1.84 KB, patch)
2009-07-07 14:20 UTC, David Mudrák
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Mudrák 2009-07-07 09:57:53 UTC
The problem is described at the URL provided. The solution is there as well.

Reproducible: Always
Comment 1 David Mudrák 2009-07-07 10:00:11 UTC
Created attachment 197030 [details, diff]
The patch fixes the problem with PHP keywords in multilines comments

Add epatch "${FILESDIR}/${PN}-5.7-php-keywords-in-comments.patch" to src_unpack()
Comment 2 David Mudrák 2009-07-07 10:01:22 UTC
Created attachment 197032 [details, diff]
Implements the useful behaviour that only class member variables are tagged

Add epatch "${FILESDIR}/${PN}-5.7-php-class-member-variables-only.patch" to src_unpack()
Comment 3 David Mudrák 2009-07-07 14:20:32 UTC
Created attachment 197070 [details, diff]
Small modification

I think the Sander's patches have problems with backward compatibility. They do not seem to tag functions starting on a new line without the visibility scope declaration, like

function ordinary_function()

because of the [ \t]+

I prepared my own version of patches that should fix this while still implementing the described behaviour. Also, I have merged both patches into a single one as I suppose no-one really wants to have _every_ variable assignment tagged. Just member variables are interesting.
Comment 4 David Mudrák 2009-07-08 14:32:28 UTC
Comment on attachment 197070 [details, diff]
Small modification

Actually, I have found

+	addTagRegex(language, "(^[ \t]*)(var[ \t]+|public[ \t]+|protected[ \t]+|private[ \t]+)+(static[ \t]+)?\\$([" ALPHA "_][" ALNUM "_]*)[ \t]*=",
+		"\\4", "v,variable,variables", NULL);

more useful because it only tags class member variables. this fits very nicely into taglist extension.
Comment 5 Wormo (RETIRED) gentoo-dev 2009-07-11 21:18:37 UTC
Thanks for submitting your patch! Assigning to ctags maintainers.