-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[PHP 8.0] Add attributes v2 support #661
Conversation
@nikic It's goes pretty well so far. I just got stuck on simple test case: 8025300#diff-39ff209fb56c0dd7ab3dcde01b4c6df1 <?php
<<Deprecated>>
function a() {
} With:
I assume the |
Thanks! It helped.
|
I've integreated your comments. It's ready for next review |
I pushed a fix for the parser conflicts. Haven't had a chance to review the rest yet. |
Thanks, that helped a lot. I'll continue |
Tests are now broken with some positions. I really don't understand why or how to fix them. Seems like attributes are not parsed anymore |
I tried to rebase on current Could you give this priority? New merged PRs makes this hell to rebase :/ I think only details are missing, but my knowledge of php grammar errors is not that advanced, so I can fix them. |
We want to use Arg[] nodes, as we also need to represent attributes with named params.
Emulation for new T_ATTRIBUTE token added in f66a32e. I've rebased this PR and fixed the shift-reduce conflicts. Unfortunately the |
This is a bit odd, but evidently the leading empty production is causing issues here.
I've mostly finished this up and merged the initial implementation. One thing that is still missing is full FPPP support. |
FPPP = Formatting-Preserving Pretty Print. It's a bit long to write out :) |
Oh, of course :) |
Closes #659
Note, this comes handy (found out 1 hour too later than needed 🤦 ):