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

feat: support php 8.4 and other improvements #247

Merged
merged 16 commits into from
Aug 17, 2024
Merged

Conversation

calebdw
Copy link
Collaborator

@calebdw calebdw commented Jun 6, 2024

Closes #246

Changes:

  • [PHP8.4] add support for new without parentheses
  • [PHP8.4] add support for property hooks
  • create anonymous_class rule
  • rename _variable_name => _simple_variable to match php parser
  • rename _class_type_designator => _class_name_reference to match php parser
  • remove unnecessary semicolon from class declaration
  • simplify by_ref definition
  • create new _identifier and _name rules
  • create _dereferencable_scalar rule to match php parser
  • [BC] cleanup namespace rules
    • removed namespace_name_as_prefix, uses prefix field
    • removed namespace_aliasing_clause, uses alias field
    • removed namespace_use_group_clause, now uses namespace_use_clause inside namespace_use_group
  • [BC] rename anonymous_function_creation_expression => anonymous_function
  • remove inline rules to decrease state count (2627 => 2507)
  • [BC] remove property_initializer rule, now uses a default_value field

Due to the BCs I plan to bump version to 0.23.0 after merging

@amaanq
Copy link
Member

amaanq commented Jun 8, 2024

nice, I'll take a look soon

@aryx
Copy link
Contributor

aryx commented Jun 17, 2024

BTW @amaanq did you see my email? I tried to contact you on gmail but no answer :(

@amaanq
Copy link
Member

amaanq commented Aug 17, 2024

Bumping to 0.23.0 is fine, I only ask that you do that when I release 0.23.0 upstream (soon)

(amended with generate optimization on master)

@amaanq amaanq merged commit 71605bf into tree-sitter:master Aug 17, 2024
4 checks passed
@amaanq
Copy link
Member

amaanq commented Aug 17, 2024

thanks a ton again @calebdw, and I'm really sorry for taking a while 😬

@calebdw calebdw deleted the php84 branch August 17, 2024 17:45
@calebdw
Copy link
Collaborator Author

calebdw commented Aug 17, 2024

No worries! Thanks for looking at it!

Ablyakim added a commit to Ablyakim/nvim-treesitter-textobjects that referenced this pull request Aug 20, 2024
- Renamed `anonymous_function_creation_expression` to
`anonymous_function` to align with the upstream change in
tree-sitter-php (see tree-sitter/tree-sitter-php#247).
kiyoon pushed a commit to nvim-treesitter/nvim-treesitter-textobjects that referenced this pull request Aug 20, 2024
- Renamed `anonymous_function_creation_expression` to
`anonymous_function` to align with the upstream change in
tree-sitter-php (see tree-sitter/tree-sitter-php#247).
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.

feature: add support for PHP 8.4
3 participants