Skip to content

refactor: byRef #388

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

Merged
merged 1 commit into from
Aug 31, 2019
Merged

refactor: byRef #388

merged 1 commit into from
Aug 31, 2019

Conversation

alexander-akait
Copy link
Collaborator

/cc @ichiriac here just fix

in the next PR i want to remove byRef node and revert some changes from fbfd46f

@coveralls
Copy link

coveralls commented Aug 31, 2019

Coverage Status

Coverage increased (+0.008%) to 95.859% when pulling 23d2743 on refactor-by-ref into 62973ef on master.

@ichiriac ichiriac self-requested a review August 31, 2019 19:59
Copy link
Member

@ichiriac ichiriac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not ok, as you said, we stick on grammar, I need instead a new AssignRef, and not a byref property on assign

@alexander-akait
Copy link
Collaborator Author

@ichiriac hm, why? AssignRef === Assign with ref, we can reduce unnecessary nodes, php parser has many unnecessary nodes

@ichiriac
Copy link
Member

AssignRef !== Assign - because AssignRef works only on = operators, so it's a subset of assign (without the need of operator property), also AssignRef does not have the same precedence as Assign with operator =

@alexander-akait
Copy link
Collaborator Author

ok, WIP

Copy link
Member

@ichiriac ichiriac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you also provide a test with $foo = &$bar + 1 in order to check precedence

@alexander-akait
Copy link
Collaborator Author

@ichiriac done 👍

@ichiriac ichiriac merged commit ae9b5b8 into master Aug 31, 2019
@alexander-akait alexander-akait deleted the refactor-by-ref branch August 31, 2019 21:24
@ichiriac
Copy link
Member

thanks @evilebottnawi - it's great

@alexander-akait
Copy link
Collaborator Author

@ichiriac WIP on remove unnecessary stuff for byRef node

@ichiriac
Copy link
Member

in principle I don't use byRef node anymore, see 72cde99 - but still it may be cases where the byref syntax is too permissive

@alexander-akait
Copy link
Collaborator Author

@ichiriac i will check all 👍

@ichiriac ichiriac mentioned this pull request Oct 26, 2019
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.

3 participants