Use the upstream TCL parser
commitef316b41573dd88c390efb586ace4a2110a07809
authorJiří Techet <techet@gmail.com>
Mon, 11 Apr 2022 23:08:13 +0000 (12 01:08 +0200)
committerJiří Techet <techet@gmail.com>
Tue, 12 Apr 2022 17:44:01 +0000 (12 19:44 +0200)
treeec26d6abdf7437804bf7dae982be9f0077da547b
parent5856e4bdb6510b1353ed7044935eed66cac87821
Use the upstream TCL parser

The TCL parser is split into three parts:

tcl - for parsing pure tcl code
tcloo - for parsing tcloo OO extension of tcl
itcl - for parsing itcl OO extension of tcl

TCLOO and ITCL parsers run the TCL parser as a subparser but it isn't
possible to combine all three parsers at the same time. Since TCLOO
is the "modern" (but 10 years old) OO extension, it seems to be a better
choice for Geany (if needed, a new filetype could be introduced for
ITCL).

Since it's run as a subparser, we need to introduce also a subparser
tag type mapping for TCL (types are mapped to the same values here
because they don't conflict with the TCLOO types).

Also, the new parser reports full scope information so take care of that.
In addition, scope by the TCL parser is prefixed by :: which we need
to strip because the TM doesn't expect scope in this format.

Update the unit test based on several uctags unit tests to cover the
tags we generate with this parser.
12 files changed:
ctags/Makefile.am
ctags/parsers/geany_tcl.c [deleted file]
ctags/parsers/tcl.c [new file with mode: 0644]
ctags/parsers/tcl.h [new file with mode: 0644]
ctags/parsers/tcloo.c [new file with mode: 0644]
meson.build
src/filetypes.c
src/tagmanager/tm_parser.c
src/tagmanager/tm_parser.h
src/tagmanager/tm_parsers.h
tests/ctags/simple.tcl
tests/ctags/simple.tcl.tags