[Github-comments] [geany/geany] Improve handling of anonymous tags (PR #3059)
Jiří Techet
notifications at xxxxx
Mon Dec 20 15:41:54 UTC 2021
@techee commented on this pull request.
> @@ -120,7 +120,15 @@ static gboolean init_tag(TMTag *tag, TMSourceFile *file, const tagEntryInfo *tag
tag->name = g_strdup(tag_entry->name);
tag->type = type;
tag->local = tag_entry->isFileScope;
- tag->pointerOrder = 0; /* backward compatibility (use var_type instead) */
+ tag->flags = tm_tag_flag_none_t;
+ if (isTagExtraBitMarked(tag_entry, XTAG_ANONYMOUS))
+ {
+ tag->flags |= tm_tag_flag_anon_t;
+ /* Temporarily store kind letter for anon name generation to flags
+ * as we don't have any other place where to store it. This will
+ * be cleared later in rename_anon_tags() */
+ tag->flags |= (guint)kind_letter << 16;
I wasn't sure if it was OK to add new members to TMTag when it's exposed to plugins. I guess ABI should be bumped in this case?
But I think having the original ctags kind letter would be useful to have in TMTag because once we map it to our `TMTagType` representation, there's no way back to get the original kind. This might be needed if we decide to generate tags files in the ctags format.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3059#discussion_r772468431
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3059/review/836536430 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211220/b39eb0df/attachment.htm>
More information about the Github-comments
mailing list