Skip to content

Fixes #48: Support PHP 7.4 typed properties#56

Merged
maxbrunsfeld merged 1 commit intotree-sitter:masterfrom
cfroystad:master
Mar 27, 2021
Merged

Fixes #48: Support PHP 7.4 typed properties#56
maxbrunsfeld merged 1 commit intotree-sitter:masterfrom
cfroystad:master

Conversation

@cfroystad
Copy link
Collaborator

Adds support for type properties according to https://wiki.php.net/rfc/typed_properties_v2

Note: This is my first go at using tree-sitter and improving the PHP parser. So any input on how to improve the contribution would be greatly appreciated. E.g. I was unable to figure out how to avoid adding a new conflict rule. Any pointers on a more elegant solution?

Note2: I've also added some more tests around classes. The PHP code in these are from https://github.com/nikic/PHP-Parser which, to my knowledge, is the most complete PHP parser. They're however BSD-3 licenced. Should this be avoided or annotated in a special way?

@maxbrunsfeld
Copy link
Contributor

Thank you, your work looks great. I appreciate all the tests that you added. That one conflict that you added (for static) seems reasonable to be me.

@maxbrunsfeld maxbrunsfeld merged commit b2f35ae into tree-sitter:master Mar 27, 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