#41 Support for class-qualified tag entry - PHP

open
None
5
2007-12-16
2007-09-12
No

Adding support for ctags option ``--extra=q'' for PHP would be great, so (function) tag is aware to which class function belongs.

Example:
Tag created for ClassName::functionName() should know that functionName() belongs to class ClassName.

From ``man ctags'':
q Include an extra class-qualified tag entry for each tag which is a member of a class (for languages
for which this information is extracted; currently C++, Eiffel, and Java).

I can help implement it, just email me.

Discussion

  • John Lindal

    John Lindal - 2007-09-15

    Logged In: YES
    user_id=1439262
    Originator: NO

    I think you'll need to re-write the php parser so it doesn't use simple regexes. If you can write it, please submit the code as a patch. Thanks!

     
  • Piotr Czachur

    Piotr Czachur - 2007-09-16

    Logged In: YES
    user_id=1888643
    Originator: YES

    Is there some API docs, I'm not sure if I can achieve the goal using regexp way or should I base on character-based parser.

     
  • Piotr Czachur

    Piotr Czachur - 2007-09-16

    Logged In: YES
    user_id=1888643
    Originator: YES

    Forgot about "?" at the end of last post.

     
  • John Lindal

    John Lindal - 2007-09-17

    Logged In: YES
    user_id=1439262
    Originator: NO

    I don't know of any docs, but you can look at the way Java and JavaScript are handled.

     
  • Elliott Hughes

    Elliott Hughes - 2007-11-01

    Logged In: YES
    user_id=1127237
    Originator: NO

    if you look at "php.c" in 5.7, you'll see the old character-based PHP parser commented out at the bottom. you could uncomment that, but there would be various test regressions, so you'd need to fix some bugs in it (i think). you might want to search the web; i believe there various improvements on the character-based PHP parser out there.

    also, if you do have a crack at this, you should subscribe to the ctags-dev mailing list and ask for help there. more people read that more frequently.

     
  • Elliott Hughes

    Elliott Hughes - 2007-12-16
    • assigned_to: nobody --> jafl
     

Log in to post a comment.