Re: [Ctags-devel] function return type
Brought to you by:
dhiebert
From: Massimo C. <ma...@em...> - 2009-05-04 22:27:19
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, a little bit late but I finally found the time to check this. Elliott Hughes wrote: > On Mon, December 15, 2008 14:22, Massimo Cora' wrote: >> Elliott Hughes wrote: >>>> i'm not aware that anyone's working on it. >> ok. I would probably put on this task. How much work do you think is >> needed to have it implemented? > > this was for C-family languages? adding the extra data and outputting it yes it is for C-family. > should be easy enough. the tricky bit will be actually recognizing which > part of the input was the return type, i think. how hard that is depends > on the language in question, and how/if its parser already distinguishes > return types. > well, shortly, on c.c you were storing only 3 tokens. But the return type of a function was coming on the fourth. prev3 prev2 prev1 curr - ------- ------- ----- ------ rettype funcname (args) { increasing the number of tokens and printing out some info at the right point made me think that maybe adding the return type of a function is a doable thing. Probably I'm wrong, but am I missing something? Ok, the pointer like 'char*' were identified by 'char', but that would really be an improvement. I've attached a little patch against svn trunk to test this. It does not modify the tags nor add extra logic, it just prints the supposed return type. regards, Massimo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkn/aNgACgkQcfVTgMRILk35EQCfbsr2g7v4m7wA5kLiQ/IHdY66 zJIAoILIhPy/hwIOtQnuNRFpQhxo86Of =tKTb -----END PGP SIGNATURE----- |