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
JavaScript: Missing methods inside modernish JavaScript class #1949
Comments
Just ran into this as well. Not indexing class methods is quite disappointing... |
there is code in the parser to parse ES6 methods.. perhaps my version from homebrew is out of date. ctags --version output.. Universal Ctags 0.0.0(6aa62c9), Copyright (C) 2015 Universal Ctags Team will try building latest |
Still not working on latest version(578ea8b) |
This is happening on one of my projects as well. In my class with |
Which standard should I read to understand the requirement? The JavaScript parser doesn't capture
I think we should introduce |
I'm no expert in this so not sure what standard you're referring to, but did you mean this EMCAScript 2015 standard? It's where computed property names, along with |
@AkitakiKou, thank you! |
I added support for getter and setter in #1989. I guess I have not solved whole the issue yet. Could you lead me the next smaller sub issue like @AkitakiKou did. I have no time to learn JavaScript from scratch.
I guess |
Yes, |
The "json-scheme" is captured well. However, My code assumes that there is only one token betwen |
Hey, great to see some activity on this! getters and setters are great to have -- I will test it out tonight. |
…ted in string literals Partially close universal-ctags#1949. Note: in universal-ctags#1949, An idea capturing [Symbol.*] is show. This change doesn't touch the idea to make the change small. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@bigfish, thank you. I pushed the code for capturing computed properties only if thay are represented in a string literal. I would like to get your feedback. |
I have worked the get/set keywords and the computed property notations. I will merge the result soon after getting an ack from @b4n. Do my changes solve this issue? |
ok, @masatake I will give it a try.. but not quite sure how to get your latest changes.. is it on a PR, or already in master? I will take a look. |
yah, it's working great. Thanks, @masatake! |
Already my changes are in master branch. |
Thank you for testing. |
O.k. I would like to close this. If the changes newly introduced for this issue are not enough, please, open new issues. I expect rather smaller input, URL to standards describing the syntax in the new issues. |
The name of the parser:
JavaScript (jscript.c)
The command line you used to run ctags:
The content of input file:
The tags output you are not satisfied with:
The tags output you expect:
The above, but also tags for the methods/computed properties.
The version of ctags:
How do you get ctags binary:
homebrew:
This is taken from an actual project am working on, but I figured the user class should be common enough to demonstrate my point. For some other module/classes there're even less tags outputted.
I think it's the use of computed properties (
get
/set
),async
and["funky-method"]
. The latter is more common then one might think, language level protocols are mostly implemented using well-known symbols.The text was updated successfully, but these errors were encountered: