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

fix: final modifier with constant visibility #208

Merged
merged 1 commit into from Jan 25, 2024

Conversation

calebdw
Copy link
Collaborator

@calebdw calebdw commented Jan 5, 2024

Checklist

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

Hello!

This closes #154 (note this was branched from #192).

A parser error was being generated when using the final modifier with a constant that also had a visibility. This was because the constant rule was conflicting with the property_declaration and method_declaration rules. Solution was to simply increase the precedence of the class constant declaration.

Thanks!

@cfroystad cfroystad merged commit 5a779d3 into tree-sitter:master Jan 25, 2024
4 checks passed
@calebdw calebdw deleted the final_constant branch January 25, 2024 18:25
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.

8.1 final class constant parse error
2 participants