xref: /Universal-ctags/docs/parser-tcl.rst (revision bb84f88a985e0b87fe4313a43b215269a119c4d1)
1.. _tcl:
2
3======================================================================
4The new Tcl parser
5======================================================================
6
7:Maintainer: Masatake YAMATO <yamato@redhat.com>
8
9Tcl parser is rewritten as a token oriented parser to support
10namespace.  It was line oriented parser. Some incompatibility between
11Exuberant Ctags is introduced in the rewriting.
12
13The line oriented parser captures `class`, `public|protected|private
14method`.  They are definitions in ITcl and TclOO. The new token oriented Tcl
15parser ignores them.  Instead ITcl and TclOO subparser running on Tcl base
16parser capture them.
17
18Known bugs
19----------------------------------------------------------------------
20
21Full qualified tags
22^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23
24The separator used in full qualified tags should be `::` but `.` is
25used.
26
27A ITcl or TclOO class `C` can be defined in a Tcl namespace `N`:
28
29.. code-block:: Tcl
30
31    namespace eval N {
32	oo::class create C {
33	}
34    }
35
36When ``--extras=+q`` is given, currently ctags reports::
37
38	N.C ...
39
40This should be::
41
42	N::C ...
43
44Much work is needed to fix this.
45
46Nested procs
47^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
49`proc` defined in a `proc` cannot be captured well.
50This is a regression.
51