Skip to content

Add arity to Params, DefNode and BlockNode #256

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

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

vinistock
Copy link
Contributor

Add an arity method to DefNode and BlockNode through Params. The method returns a range where the lower bound is minimum and the upper bound is the maximum number of arguments that may be used to invoke that block/method.

Question: should we add the same to Lambda? We have no immediate use case for it, but maybe it makes sense for completion sake.

Copy link
Member

@kddnewton kddnewton left a comment

Choose a reason for hiding this comment

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

A couple of small changes and then this is good to go!

@vinistock vinistock force-pushed the vs/add_arity_to_def_node branch from aef211c to b47eb46 Compare January 18, 2023 19:13
@vinistock
Copy link
Contributor Author

Once this one goes in, I'll rebase #257 and apply the same comments about memoization, attr readers and infinity to match this one.

Copy link
Member

@kddnewton kddnewton left a comment

Choose a reason for hiding this comment

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

Looks good, nice work!

@kddnewton kddnewton merged commit d27709b into ruby-syntax-tree:main Jan 18, 2023
@vinistock vinistock deleted the vs/add_arity_to_def_node branch January 18, 2023 19:34
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