Consistently rename anonymous tags and drop the last ctags diff
commitdbd0ebc914d5ac56baef3fe1c28acda9d7ff3e09
authorJiří Techet <techet@gmail.com>
Mon, 6 Dec 2021 21:35:46 +0000 (6 22:35 +0100)
committerJiří Techet <techet@gmail.com>
Mon, 10 Jan 2022 22:10:44 +0000 (10 23:10 +0100)
tree96bbe83fcaf6e1b01ae7351d0a598bfd7ce6971d
parentea660f8b1fab4c0da5a399db79487e56b59dc7da
Consistently rename anonymous tags and drop the last ctags diff

Check all the collected tags once a file is parsed (i.e. when
we have all tags, including those from subparsers) and renamea
them in the form

anon_enum_1
anon_struct_1
anon_enum_2
anon_struct_2

where the second component is a ctags kind and the number is
per-kind.

In addition, scopes of the nested tags have to be updated if the parent
tag is an anonymous tag.

Finally, for anonymous tags of the form typedef struct Foo{int a;};
we can use the name of the typedef instead of generating the
anonymous name. In this case we can drop the typedef tag once
the anonymous tag is updated with its name.

More details can be found in comments.
ctags/ctags_changes.patch [deleted file]
ctags/main/parse.c
scripts/update-ctags.py
src/tagmanager/tm_ctags.c
src/tagmanager/tm_source_file.c
src/tagmanager/tm_tag.h