Skip to content

[WIP] enhance parser versioning #4271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

masatake
Copy link
Member

@masatake masatake commented Jun 8, 2025

When releasing, I have to update the NEWS file.
One important topic is how parsers are enhanced, with new kinds, roles, fields, and extras (KRFX).
We have added and updated the 'ctags-lang-*' man pages mainly to track the KRFX.
Updating the man pages only to track them is a boring task.
Instead, making ctags itself report new KRFX.

This change adds version members to KRFX definitions.

Various-- list* commands show the version numbers in the VER column:

$ ./ctags --list-kinds-full=Automake
#LETTER NAME      ENABLED REFONLY NROLES MASTER VER DESCRIPTION
D       data      yes     no      0      NONE     0 datum
L       library   yes     no      0      NONE     0 libraries
M       man       yes     no      0      NONE     0 manuals
P       program   yes     no      0      NONE     0 programs
S       script    yes     no      0      NONE     0 scripts
T       ltlibrary yes     no      0      NONE     0 ltlibraries
c       condition yes     yes     1      NONE     0 conditions
d       directory yes     no      6      NONE     0 directories
p       pseudodir no      yes     6      NONE     1 placeholder for EXTRA_, noinst_, ...
s       subdir    yes     no      0      NONE     0 subdirs

--describe-language option was added.

$ ./ctags --describe-language=RpmMacros          
About RpmMacros language
=======================================================
enabled: yes
version: 0.0

Mappings/patterns
-------------------------------------------------------


Mappings/extensions
-------------------------------------------------------


Aliases
-------------------------------------------------------
#ALIAS

Kinds
-------------------------------------------------------
#LETTER NAME  ENABLED REFONLY NROLES MASTER VER DESCRIPTION
m       macro yes     no      0      NONE     0 macros

Roles
-------------------------------------------------------
#KIND(L/N) NAME ENABLED VER DESCRIPTION

Fields
-------------------------------------------------------
#LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP VER DESCRIPTION

Extras
-------------------------------------------------------
#LETTER NAME ENABLED LANGUAGE FIXED VER DESCRIPTION

Parameters
-------------------------------------------------------
#NAME DESCRIPTION

Sub parsers stacked on this parser
-------------------------------------------------------
#NAME BASEPARSER DIRECTIONS

Implementation specific status
-------------------------------------------------------
allow null tags: no

TODO:

  • implement --list-languages-full
  • update ctags.1.rst
  • add test cases
  • describe versioning in hacking guide
  • ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant