Re: [Ctags] macro and -I definition
Brought to you by:
dhiebert
From: Darren H. <dhi...@us...> - 2002-02-05 03:16:25
|
On Mon, 4 Feb 2002, Gary Holloway wrote: > --regex-c=/DEF_[A-Z]*_CMPD?_FUN\([ \t]*([a-zA-Z0-9_]*)[ \t]*,.*\)/\1/f,function/ > > *almost* works... I do get a function tag, but what I don't get is the "file:" > qualifier that I get due the the "static" during normal parsing: > > compare_rog resprod.c /^static DEF_STR_CMP_FUN(compare_rog, ResOccGrp , occupation_group)$/;" function language:C > > This is important to me because I've got syntax-highlighting stuff being > generated from the tags files, and it makes a distinction between local > (static) and global (e.g., library) functions. > > It appears that the only options for the kind-spec of --regex is the simple > kind, with no way to specifiy any other tag attributes. Adding an ability to supply arbitrary extension fields opens a can of worms that I am not ready to deal with. I am pretty resistent at the moment to get into this. This is the problem with adding any new functionality. As soon as folks have it, they then see something else they want. :-( Of course, if it weren't for this tendency, then ctags wouldn't be what it is today. :-) > Would it be possible to do this... or to supply an actual substitution regexp > such that the substituted line is used for tags parsing, while the original > line is still used for the pattern associated with any tags generated? How about an alternative suggestion? How about using a custom tag kind in the regex, which your syntax file generating script senses and uses to appropriately highlight these special types (i.e. in the static function highlight style)? -- Darren Hiebert <darren@DarrenHiebert.com> http://DarrenHiebert.com |