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: add attributes to interfaces and traits #252

Merged
merged 4 commits into from
Jul 26, 2024

Conversation

calebdw
Copy link
Collaborator

@calebdw calebdw commented Jul 26, 2024

Closes #251

I wasn't sure if attributes on interfaces is supported by PHP given that the docs state:

Classes, methods, functions, parameters, properties and class constants can be the target of an attribute.

However, the PHP parser does parse them:

https://github.com/php/php-src/blob/a7bd911ad6a6045a9619eb56814569bff1b8bd03/Zend/zend_language_parser.y#L384-L390

Other changes:

  • added attributes to trait declarations
  • fixed error when throw is used as a named argument
  • fixed error when passing variable by reference to promoted property

@calebdw calebdw changed the title feat: add attributes to interfaces feat: add attributes to interfaces and traits Jul 26, 2024
@calebdw calebdw force-pushed the attributed_interfaces branch 2 times, most recently from 5461a6a to 93dc69b Compare July 26, 2024 15:48
@calebdw calebdw merged commit 86e3ffe into tree-sitter:master Jul 26, 2024
4 checks passed
@calebdw calebdw deleted the attributed_interfaces branch July 26, 2024 15:56
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.

bug: Allow use Attributes with Interfaces
1 participant