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

Track rest, keyword rest and post parameters #1228

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

vinistock
Copy link
Member

Motivation

Another step for #899

This PR starts tracking rest, keywords and post parameters. After this PR, all parameter types are handled.

Implementation

Started handling the rest, keyword_rest and posts part of the parameters node. For clarity, the parameters are:

  • Rest: a splat parameter def foo(*a); end
  • Keyword rest: a keyword splat parameter def foo(**a); end
  • Posts: a required or destructured required parameter after a rest or keyword rest: def foo(*a, b); end -> the b is the post here

Automated Tests

Added tests.

@vinistock vinistock added the enhancement New feature or request label Nov 29, 2023
@vinistock vinistock self-assigned this Nov 29, 2023
@vinistock vinistock requested a review from a team as a code owner November 29, 2023 20:07
@vinistock vinistock force-pushed the vs/track_rest_parameters branch 2 times, most recently from dfa098a to af9a467 Compare November 30, 2023 15:22
lib/ruby_indexer/lib/ruby_indexer/entry.rb Show resolved Hide resolved
lib/ruby_indexer/lib/ruby_indexer/entry.rb Outdated Show resolved Hide resolved
lib/ruby_indexer/lib/ruby_indexer/entry.rb Outdated Show resolved Hide resolved
@vinistock vinistock merged commit 8bf60ca into main Dec 1, 2023
24 of 30 checks passed
@vinistock vinistock deleted the vs/track_rest_parameters branch December 1, 2023 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants