[Github-comments] [geany/geany] Improve handling of anonymous tags (PR #3059)
Jiří Techet
notifications at xxxxx
Mon Dec 20 16:06:03 UTC 2021
@techee commented on this pull request.
> +{
+ guint i;
+ char dummy;
+
+ if (lang == TM_PARSER_C || lang == TM_PARSER_CPP)
+ {
+ return sscanf(name, "anon_%*[a-z]_%u%c", &i, &dummy) == 1 ||
+ sscanf(name, "__anon%u%c", &i, &dummy) == 1;
+ }
+ else if (lang == TM_PARSER_FORTRAN || lang == TM_PARSER_F77)
+ {
+ return sscanf(name, "Structure#%u%c", &i, &dummy) == 1 ||
+ sscanf(name, "Interface#%u%c", &i, &dummy) == 1 ||
+ sscanf(name, "Enum#%u%c", &i, &dummy) == 1;
+ }
+ return FALSE;
Basically we should now always get the anon flag in our tags file (notice the `1` at the end) so it should be needed only for legacy tags files. But it's true we should probably check for the `__anon` name in case we read tags in the ctags file format and this file is generated without the `E` field.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3059#discussion_r772487073
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3059/review/836562938 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211220/1d624369/attachment.htm>
More information about the Github-comments
mailing list