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

D: fix parsing parameter with pointer #3715

Merged
merged 1 commit into from
May 10, 2023

Conversation

ntrel
Copy link
Contributor

@ntrel ntrel commented May 8, 2023

This just removes the remnants of code for fallback C parsing. identifierCount is never changed anywhere.

Now the test for inout(T) works.

@codecov
Copy link

codecov bot commented May 8, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.04 🎉

Comparison is base (027c099) 82.96% compared to head (0a8550c) 83.00%.

❗ Current head 0a8550c differs from pull request most recent head 3c58e8d. Consider uploading reports for the commit 3c58e8d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3715      +/-   ##
==========================================
+ Coverage   82.96%   83.00%   +0.04%     
==========================================
  Files         226      226              
  Lines       54969    54969              
==========================================
+ Hits        45606    45629      +23     
+ Misses       9363     9340      -23     
Impacted Files Coverage Δ
parsers/c-based.c 82.61% <ø> (+1.78%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Units/parser-d.r/simple.d.d/input.d Show resolved Hide resolved
@@ -73,7 +73,7 @@ Object obj;

const(int)* type_con;
immutable(int)* type_imm;
inout(int)* f_inout(inout Object); // FIXME
inout(int)* f_inout(inout(int)* p) { return p; }
Copy link
Member

Choose a reason for hiding this comment

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

Instead of replacing this new f_input with

inout(int)* f_inout(inout Object);

,
could you add this new one as g_inout or something like:

inout(int)* f_inout(inout Object);
inout(int)* g_inout(inout(int)* p) { return p; }

?

Here I assume, with this new change, ctags can extract both f_input and g_input.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For some reason D prototypes are not generating tags:

  • Interface.bar is missing
  • attr_post is missing

The weird thing is that in my branch of Geany there are tags for prototypes, and I don't think c-based.c has any changes that cause it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Restored inout prototype.

@masatake
Copy link
Member

Thank you for updating.
Could you squash the two commits into one?

Keep separate inout prototype
@masatake masatake merged commit db05406 into universal-ctags:master May 10, 2023
@masatake
Copy link
Member

Thank you!

@ntrel ntrel deleted the ptr-param branch May 10, 2023 16:05
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.

2 participants