[Github-comments] [geany] C, C++, C#, D: Improve return type and var type recognition (#889)

Colomban Wendling notifications at xxxxx
Thu Feb 11 14:21:35 UTC 2016


>  	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)))

> @b4n is concerned about the template params in autocompletion, I'm concerned about them in the tooltips.

I'm not really concerned about one side or the other, just about reporting something relevant.  Actually, I'd rather be concerned by reporting relevant tooltips, and then when it works figure out how the heck we can use that for completion.

> Maybe those need to be separate things, with the tooltip being just a copy of the relevant part of the source as suggested above. 

Indeed, maybe.  Though, I tried to "just [make] a copy of the source", and it seems a lot easier said than done, because for some reason the token's position don't seem to be really correct and I get more or less garbage that way.  I dropped it after pulling my last hair.  I might give it another shot when they have grew back :)

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/889/files#r52606297
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160211/9a33abde/attachment.html>


More information about the Github-comments mailing list