In tagmanager/ctags/c.c:

>  	for (i = 0; i < st->tokenIndex; i++)
>  	{
> +		const tokenInfo *const t = st->token[i];
> +
> +		/* stop if we find the token used to generate the tag name, or
> +		 * a name token in the middle yet not preceded by a scope separator */
> +		if ((t == nameToken ||
> +		     (t->type == nameToken->type &&
> +		      t->keyword == nameToken->keyword &&
> +		      t->lineNumber == nameToken->lineNumber &&
> +		      strcmp(vStringValue(t->name), vStringValue(nameToken->name)) == 0)) ||
> +		    (t->type == TOKEN_NAME && seenType &&
> +		     (i > 0 && st->token[i - 1]->type != TOKEN_DOUBLE_COLON)))

@elextr I'm afraid that proper template parsing would double the c.c size and would take a really lot of time to develop. The only possibility to have templates in the type is to really just record the input string together with some reasonable begin/end type detection. But even this will probably require quite some work and the question is whether it's worth it.

The implementation in this patch is good enough IMO - at least for the scope completion where we'd have to remove the templates anyway.


Reply to this email directly or view it on GitHub.