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

Endless methods #190

Merged
merged 3 commits into from
Oct 9, 2021
Merged

Endless methods #190

merged 3 commits into from
Oct 9, 2021

Conversation

aibaars
Copy link
Contributor

@aibaars aibaars commented Oct 8, 2021

This pull request adds "endless" method definitions. Ruby 3 allows for method definitions like

def square(x) = x * x

See also https://bugs.ruby-lang.org/issues/16746

Checklist:

  • All tests pass in CI.
  • There are sufficient tests for the new fix/feature.
  • Grammar rules have not been renamed unless absolutely necessary.
  • The conflicts section hasn't grown too much.
  • The parser size hasn't grown too much (check the value of STATE_COUNT in src/parser.c).

The STATE_COUNT is increased, hopefully not excessively:
before:

src/parser.c:#define STATE_COUNT 3312
src/parser.c:#define LARGE_STATE_COUNT 1237

after:

src/parser.c:#define STATE_COUNT 3856
src/parser.c:#define LARGE_STATE_COUNT 1453
```

@aibaars aibaars changed the title End less methods End-less methods Oct 8, 2021
@aibaars aibaars changed the title End-less methods Endless methods Oct 8, 2021
@aibaars aibaars marked this pull request as ready for review October 8, 2021 10:34
@aibaars aibaars requested a review from maxbrunsfeld October 8, 2021 10:34
Copy link
Contributor

@maxbrunsfeld maxbrunsfeld left a comment

Choose a reason for hiding this comment

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

Looks great

@aibaars aibaars merged commit d1171a5 into tree-sitter:master Oct 9, 2021
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