To see this in action, create a Java file (the default one will do) and add the following functions:
public int[] myTestFunctionOne(){ return null; }
public String[] myTestFunctionTwo(){ return null; }
Save the file and check the generated tags. The second function will be correctly found, but another tag "String" will be generated, pointing to the same line. Autocompletion of the function name works fine, as does the parameter listing when the name is complete and you type "(".
If I get a chance over the weekend I'll take a look at the lexer. Remind me (and I really should remember this), is it based on ctags? ie. If I make a working patch, should I submit it to the ctags project?
Jon
On Thu, 25 Nov 2010 18:21:46 +0100 Jon Senior jon@restlesslemon.co.uk wrote:
If I get a chance over the weekend I'll take a look at the lexer.
Note: we use 'lexer' for syntax highlighting, 'parser' for tags. They are implemented differently.
Remind me (and I really should remember this), is it based on ctags? ie. If I make a working patch, should I submit it to the ctags project?
'tagmanager/c.c' does Java parsing and is based on CTags, but it is quite out of sync. Depending on the patch it's possible it could be compatible with CTags too. It's also possible they already fixed the problem.
Nick
On Thu, 25 Nov 2010 17:56:13 +0000 Nick Treleaven nick.treleaven@btinternet.com wrote:
If I get a chance over the weekend I'll take a look at the lexer.
Note: we use 'lexer' for syntax highlighting, 'parser' for tags. They are implemented differently.
Actually you probably know that already, sorry ;-)
Nick
On Thu, 25 Nov 2010 18:28:47 +0000 Nick Treleaven nick.treleaven@btinternet.com wrote:
Actually you probably know that already, sorry ;-)
S'ok. I was writing in a bit of a hurry, trying to do too many things at once. I'll check the current version in ctags and see if that solves it. If not, I'll try and patch it.
Hopefully this weekend...
Jon
On Thu, 25 Nov 2010 17:56:13 +0000 Nick Treleaven nick.treleaven@btinternet.com wrote:
'tagmanager/c.c' does Java parsing and is based on CTags, but it is quite out of sync. Depending on the patch it's possible it could be compatible with CTags too. It's also possible they already fixed the problem.
Regarding the sync, you weren't kidding. I've not yet identified what the difference is that allows the newer version to work (but it seems to, the resulting tags file has a single entry for the test function that I put in my initial mail.
A question; if the change turns out to be large, would it be a better idea to re-base the tagmanager to use the current ctags code. IIRC someone was looking at doing memory based parsing of tags, rather than file based so it might be useful if we collaborated a little on this.
Jon