Skip to content
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

vim: support new ":def" functions of vim9 #2590

Merged
merged 2 commits into from
Jul 8, 2020
Merged

vim: support new ":def" functions of vim9 #2590

merged 2 commits into from
Jul 8, 2020

Conversation

lacygoill
Copy link
Contributor

This PR tries to add support for the new :def functions introduced in Vim9. See issue #2589 for more information.

I briefly tested the patch, and it seems to work. That is now ctags(1) correctly generates tags for :def functions.

But I don't know if it's really correct; I don't know C.

If it is correct, I think I could also add support for constants defined with the :const keyword.

@coveralls
Copy link

coveralls commented Jul 8, 2020

Coverage Status

Coverage remained the same at 86.777% when pulling 1a44f70 on lacygoill:vim9-def-functions into b4574f0 on universal-ctags:master.

@codecov
Copy link

codecov bot commented Jul 8, 2020

Codecov Report

Merging #2590 into master will decrease coverage by 0.00%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2590      +/-   ##
==========================================
- Coverage   86.67%   86.67%   -0.01%     
==========================================
  Files         183      183              
  Lines       38608    38608              
==========================================
- Hits        33464    33462       -2     
- Misses       5144     5146       +2     
Impacted Files Coverage Δ
parsers/cxx/cxx_parser.c 85.42% <60.00%> (ø)
parsers/vim.c 99.59% <100.00%> (ø)
parsers/cxx/cxx_parser_variable.c 90.56% <0.00%> (-0.63%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4574f0...1a44f70. Read the comment docs.

Copy link
Member

@masatake masatake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change the first line of the commit log to:

vim: support new ":def" functions of vim9

because we expect the first word of the commit log is names of parsers or names of subsystems.

We need a test case. Units/parser-vim.r is the directory for the vim parser. I need a test case for :def here.
See https://docs.ctags.io/en/latest/units.html . You can tests the vim parser with:

$ make units LANGUAGES=Vim

@lacygoill lacygoill changed the title [vim9] support new ":def" functions vim: support new ":def" functions of vim9 Jul 8, 2020
@masatake
Copy link
Member

masatake commented Jul 8, 2020

@lacygoill, please look at 1a44f70 .

A test case consists of two files: an input file and an expected output file.
You prepared only an input file. The expected output is so obvious. So I added it.

When adding code for :const, please include both files for new code to your commit.

@masatake masatake merged commit 81a8999 into universal-ctags:master Jul 8, 2020
@masatake
Copy link
Member

masatake commented Jul 8, 2020

Thank you for your contribution. I'm waiting for the patch for :const:-)

@lacygoill
Copy link
Contributor Author

Thank you very much for merging the PR.

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.

None yet

3 participants