universal-ctags / ctags

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

Java: file field for enum constant #1844

Open masatake opened 6 years ago

masatake commented 6 years ago

The name of the parser: Java

The command line you used to run ctags: --options=NONE -o - /tmp/e.java

The content of input file:

public enum e {
    A
};

The tags output you are not satisfied with:

A   /tmp/e.java /^    A$/;" e   enum:e  file:
e   /tmp/e.java /^public enum e {$/;"   g

The tags output you expect:

A   /tmp/e.java /^    A$/;" e   enum:e
e   /tmp/e.java /^public enum e {$/;"   g

The version of ctags:

[yamato@master]/proc/sys% u-ctags --version
u-ctags --version
Universal Ctags 0.0.0(f5c38641), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Aug 16 2018, 19:44:42
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +iconv, +debug, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +aspell
masatake commented 6 years ago

I think file: field is not needed for A. How do you think? I'm working on peg based new Java parser. I will fix this in the new parser.

chrismwendt commented 5 years ago

@masatake Out of curiosity, are you still working on a new PEG-based Java parser?

masatake commented 5 years ago

PEG based Java parser is too slow. So I'm writing new Jara parser from scratch now.

masatake commented 5 years ago

A cotributor submitted a typescript parser. So I have taken time for merging it. TypeScript is very special exception. So many people want it. Rewriting Java and Ruby parsers have still high priority in my mind because I myself want to use in daily job.