[Github-comments] [geany/geany] Use the upstream TCL parser (PR #3157)

Jiří Techet notifications at github.com
Tue Apr 12 18:18:42 UTC 2022


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.
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/3157

-- Commit Summary --

  * Use the upstream TCL parser

-- File Changes --

    M ctags/Makefile.am (4)
    D ctags/parsers/geany_tcl.c (145)
    A ctags/parsers/tcl.c (716)
    A ctags/parsers/tcl.h (51)
    A ctags/parsers/tcloo.c (201)
    M meson.build (4)
    M src/filetypes.c (2)
    M src/tagmanager/tm_parser.c (31)
    M src/tagmanager/tm_parser.h (1)
    M src/tagmanager/tm_parsers.h (3)
    M tests/ctags/simple.tcl (59)
    M tests/ctags/simple.tcl.tags (19)

-- Patch Links --

https://github.com/geany/geany/pull/3157.patch
https://github.com/geany/geany/pull/3157.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3157
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3157 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220412/6d48db1f/attachment.htm>


More information about the Github-comments mailing list