<p></p>
<p><b>@kugel-</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/3059#discussion_r772653037">src/tagmanager/tm_ctags.c</a>:</p>
<pre style='color:#555'>> +                                            if (!removed_typedefs)
+                                                       removed_typedefs = g_ptr_array_new();
+                                               g_ptr_array_add(removed_typedefs, GUINT_TO_POINTER(j));
+                                       }
+                               }
+                       }
+
+                       /* there's no typedef name for the anon tag so let's generate one  */
+                       if (!new_name)
+                       {
+                               gchar buf[50];
+                               guint anon_counter;
+                               const gchar *kind_name = tm_ctags_get_kind_name(kind, tag->lang);
+
+                               if (!anon_counter_table)
+                                       anon_counter_table = g_new0(gchar, 256);
</pre>
<p dir="auto">Err, well, I thought of simply placing the array on the stack (at the function begin). I'm also not sure if 8 bit counter will suit everyone. I think generated sources (from a large vala file or someting like that) could easily overflow 256 anon structs.</p>
<p dir="auto">I think a <code>gint anon_counter_table[256]</code> should work.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/3059#discussion_r772653314">src/tagmanager/tm_parser.c</a>:</p>
<pre style='color:#555'>> @@ -818,6 +818,28 @@ void tm_parser_verify_type_mappings(void)
 }
 
 
+/* determine anonymous tags from tag names only when corresponding
+ * ctags information is not available */
+gboolean tm_parser_is_anon_name(TMParserType lang, gchar *name)
+{
+       guint i;
+       char dummy;
+
+       if (lang == TM_PARSER_C || lang == TM_PARSER_CPP)
+       {
+               return sscanf(name, "anon_%*[a-z]_%u%c", &i, &dummy) == 1 ||
</pre>
<p dir="auto">Agree</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/3059#discussion_r772655558">tests/ctags/enum.f90.tags</a>:</p>
<pre style='color:#555'>> @@ -11,6 +9,8 @@ Named5
 Named6�2�Constants�0
 Named7�2�Constants�0
 a�4�Enum#1�0
+anon_enum_1�2�Constants�1
+anon_enum_2�2�Constants�1
</pre>
<p dir="auto">Yea, lets see if there's any (negative) feedback.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/3059#discussion_r772656345">src/tagmanager/tm_parser.c</a>:</p>
<pre style='color:#555'>> +{
+       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;
</pre>
<p dir="auto">But what about existing tag files for java script?</p>
<div class="highlight highlight-source-diff"><pre><span class="pl-md"><span class="pl-md">-</span>AnonymousFunction2�16�(n)�class3.c3m1�0</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>anon_function_1�16�()�class2.c2m1�1</span></pre></div>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3059#pullrequestreview-836793260">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ276A3JJV6IPMDDHZDUR6I4DANCNFSM5KMJEVBQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJYRP6XRBTLJTO4EGV3UR6I4DA5CNFSM5KMJEVB2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOGHQHHLA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/pull/3059/review/836793260</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3059#pullrequestreview-836793260",
"url": "https://github.com/geany/geany/pull/3059#pullrequestreview-836793260",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>