Skip to content

Commit

Permalink
docs(web): write about null tags for parser developers
Browse files Browse the repository at this point in the history
Signed-off-by: Masatake YAMATO <[email protected]>
  • Loading branch information
masatake committed Dec 19, 2024
1 parent bbb8fd2 commit a82df36
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/internal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,26 @@ Refer `peg/valink.peg
<https://github.com/universal-ctags/ctags/blob/master/peg/varlink.peg>`_ as a
sample of a parser using PackCC.

Null tags
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*Null tag* is a tag having an empty string as its name.

Universal Ctags supports null tags cautiously.
See the description for ``nulltag``/``z`` extra in :ref:`ctags(1) <ctags(1)>`.

If you want to make a null tag, set 1 to ``allowNullTag`` of
``tagEtnryInfo`` before calling ``makeTagEntry``. ``makeTagEntry``
evaluates the member. The following pseudo code doesn't work:

.. code-block:: C
tagEntryInfo e;
/* ... */
int corkIndex = makeTagEntry (&e);
/* ... */
tagEntryInfo *p = getEntryInCorkQueue (corkIndex);
p->allowNullTag = 1;
Automatic parser guessing (TBW)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit a82df36

Please sign in to comment.