You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do you get ctags binary: downloaded git head, and builded manually
Some comments:
$ ./ctags --list-kinds-full='Ada' shows:
#LETTER NAME ENABLED REFONLY NROLES MASTER DESCRIPTION
S separate yes no 0 NONE (ctags internal use)
The description says it is '(ctags internal use)' and ENABLED is yes, what makes these tags are outputed by default. Looks a bit odd to output 'ctags internal use'-tags by default.
When reading the code: ada.c
elseif(adaKeywordCmp(ADA_KEYWORD_SEPARATE))
{
/* skip any possible whitespace */skipWhiteSpace();
/* skip over the "(" until we hit the tag */if(exception!=EXCEPTION_EOF&&line[pos] =='(')
{
movePos(1);
skipWhiteSpace();
/* get length of tag */for(i=1; (pos+i) <lineLen&&line[pos+i] !=')'&&
!isspace(line[pos+i]); i++);
>/* if this is a separate declaration, all it really does is create> * a false high level token for everything in this file to belong> * to... But we don't know what kind it is, so we declare it as> * ADA_KIND_SEPARATE, which will cause it not to be placed in> * the tag file, and the item in this file will be printed as> * separate:<name> instead of package:<name> or whatever the> * parent kind really is (assuming the ctags option will be on> * for printing such info to the tag file) */token=newAdaToken(&line[pos], i, ADA_KIND_SEPARATE, false,
parent);
/* since this is a false top-level token, set parent to be * token */parent=token;
token=NULL;
/* skip past the ')' */skipPast(")");
} /* if(line[pos] == '(') */else
{
/* move to the end of this statement */skipPast(";");
}
} /* else if(adaKeywordCmp(ADA_KEYWORD_SEPARATE)) */
So it looks like the code (ada.c) assumes a tag for separate is not placed in the tags file (unless the ctags option will be on for printing such info to the tag file)
Looks like this change was introduced 4 years ago by: #1584 (but I may be wrong, as I have not much experience with git/github.
But I wonder if it is not better to a change this in ada.c?
If you can confirm this is a mistake, then I'll create a pull request (i.e. update code + add a test) when I find the time. (probably during a bad-weather weekend)
The text was updated successfully, but these errors were encountered:
Now I think I understand. Buffer is a reference to a package named Buffer.
So it should be captured as a reference tag.
Tagging it is important because Buffer is a parent scope of Test.
Without tagging Buffer, the scope field of Test cannot be filled.
However, Buffer in separate(Buffer) is not a definition.
There might be a dilemma.
The name of the parser: Ada
The command line you used to run ctags:
The content of input file:
The tags output you are not satisfied with:
The tags output you expect: No tag for 'separate (Buffer)'
The version of ctags:
How do you get ctags binary: downloaded git head, and builded manually
Some comments:
The description says it is '(ctags internal use)' and ENABLED is yes, what makes these tags are outputed by default. Looks a bit odd to output 'ctags internal use'-tags by default.
When reading the code: ada.c
So it looks like the code (ada.c) assumes a tag for separate is not placed in the tags file (unless the ctags option will be on for printing such info to the tag file)
Looks like this change was introduced 4 years ago by: #1584 (but I may be wrong, as I have not much experience with git/github.
Was this intentional to activate the output separate tags by default, or a mistake?
I would have expected to see a:
As workaround we add option:
But I wonder if it is not better to a change this in ada.c?
If you can confirm this is a mistake, then I'll create a pull request (i.e. update code + add a test) when I find the time. (probably during a bad-weather weekend)
The text was updated successfully, but these errors were encountered: