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: parse user-defined attributes #3701

Merged
merged 2 commits into from
Apr 30, 2023
Merged

Conversation

ntrel
Copy link
Contributor

@ntrel ntrel commented Apr 29, 2023

Hi,
I'm working on porting the remaining Geany D parser changes to ctags.

UDAs can precede a declaration or come after a function parameter list.
https://dlang.org/spec/attribute.html#uda

  • I'm not sure if all the lines in expected.tags starting with !_TAG_ should be there. Please let me know if there's a switch I should be using.
  • I'm not sure if I add a changelog entry somewhere, please let me know.

@codecov
Copy link

codecov bot commented Apr 29, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (39a0172) 82.82% compared to head (2f6af94) 82.83%.

❗ Current head 2f6af94 differs from pull request most recent head 9f54e5d. Consider uploading reports for the commit 9f54e5d to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3701   +/-   ##
=======================================
  Coverage   82.82%   82.83%           
=======================================
  Files         226      226           
  Lines       54752    54754    +2     
=======================================
+ Hits        45351    45353    +2     
  Misses       9401     9401           
Impacted Files Coverage Δ
parsers/c-based.c 80.62% <100.00%> (+0.03%) ⬆️

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

@masatake
Copy link
Member

A minor request; could you change the commit header to "D: parse user-defined attributes"?

!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 6.0.0 /4a101fd4/
Copy link
Member

Choose a reason for hiding this comment

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

You can remove all '!_' tags from the expected.tags.

@masatake
Copy link
Member

I would like you to split the commit into two.

The new commit #1 is for just changing the function name. The commit header may be "Java,refactor: Rename parseJavaAnnotation() to parseAtMarkStyleAnnotation()".

In the new commit #2, add D specific changes using parseAtMarkStyleAnnotation().

@masatake masatake changed the title [D] parse user-defined attributes D: parse user-defined attributes Apr 29, 2023
@masatake masatake added this to the 6.1 milestone Apr 29, 2023
@ntrel
Copy link
Contributor Author

ntrel commented Apr 29, 2023

@masatake Thanks, I've done that except the commits are in opposite order. I hope that's OK (wasn't sure how to do it the other way with git).

@masatake
Copy link
Member

Thank you for updating.

@masatake Thanks, I've done that except the commits are in opposite order. I hope that's OK (wasn't sure how to do it the other way with git).

O.k. I will take over this...however, I recommend you to learn 'git rebase -i' and 'git push --force'. git rebase -i is not only useful but also ... impressive. I wonder who designed the function. Linus? I like the git features for polishing commits.

Quoted from the pull request (universal-ctags#3701):

  UDAs can precede a declaration or come after a function parameter list.
  https://dlang.org/spec/attribute.html#uda

@mastake edited the commit log.
@masatake masatake merged commit 7e5c8dc into universal-ctags:master Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants