universal-ctags / ctags

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

JavaScript static initialization blocks break the tagging of the rest of the class #3948

Closed cpardotortosa closed 3 months ago

cpardotortosa commented 3 months ago

The name of the parser: JavaScript

The command line you used to run ctags:

$ ctags -x --options=NONE test.js

The content of input file:


class a {
    static { }
    fld;
}

The tags output you are not satisfied with:

a                class         1 test.js          class a {

The tags output you expect:

a                class         1 test.js          class a {
fld              field         3 test.js          fld;

The version of ctags:

Universal Ctags 6.1.0(p6.1.20240303.0), Copyright (C) 2015-2023 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Mar  3 2024, 01:55:22
  URL: https://ctags.io/
  Output version: 0.0
  Optional compiled features: +win32, +wildcards, +regex, +gnulib_regex, +internal-sort, +unix-path-separator, +iconv, +option-directory, +xpath, +json, +interactive, +yaml, +case-insensitive-filenames, +packcc, +optscript, +pcre2

How do you get ctags binary: win32 binary taken from Universal-ctags/ctags-win32 project

masatake commented 3 months ago

@cpardotortosa Thank you for reporting.