universal-ctags / ctags

A maintained ctags implementation
https://ctags.io
GNU General Public License v2.0
6.38k stars 618 forks source link

tagging pascal language does not recognize one-line-comments '//' #3988

Closed HoTschir closed 1 month ago

HoTschir commented 2 months ago

Modern pascal compilers (like Free Pascal) support inline or one line comments (see https://wiki.freepascal.org/Comments). This is not supported by ctags so far.

When there is a key name ('function', 'procedure') within this comment, following name will wrongly be tagged (attachment _taggingtest.pas and _result file taggingtest.pas.tags). Tags 'will' and 'end' are wrong.

As an attachment, there is a patch (_ctags_pascal_onelinecommentfix.diff) for pascal.c source file, which will solve the problem. Result is seen in file _tagging_test_afterpatch.pas.tags. Neither 'will' nor 'end' is tagged after the patch.

Kindly request you to include the patch in master.

Regards. ctags_pascal_onelinecomment.zip

masatake commented 2 months ago

Thank you. but...why don't you make a pull request for the change?