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

resolvePrecedence break location for bin nodes #230

Closed
alexander-akait opened this issue Nov 9, 2018 · 7 comments
Closed

resolvePrecedence break location for bin nodes #230

alexander-akait opened this issue Nov 9, 2018 · 7 comments
Assignees
Labels
AST bug RELEASE-READY Waiting to release

Comments

@alexander-akait
Copy link
Collaborator

Input:

$var1 + $var2 + $var3;

Any ideas how we can fix it? I try but it looks very difficult 😕
/cc @ichiriac

@ichiriac ichiriac self-assigned this Nov 10, 2018
@ichiriac
Copy link
Member

not sure but the resolve precedence is only supposed to move nodes, not their location, so the only introduced problem could be to rename some property, like what that could become something else and used here : https://github.com/glayzzle/php-parser/blob/master/src/ast.js#L204

I need to look more in details, but in principle should not break any node location, just their orders

@ichiriac
Copy link
Member

Hi @evilebottnawi, I've checked and everything seems correct, I don't see any bug

@ichiriac ichiriac added RELEASE-READY Waiting to release investigating and removed RELEASE-READY Waiting to release bug labels Nov 21, 2018
@alexander-akait
Copy link
Collaborator Author

@ichiriac problem in offset in location, they invalid

@alexander-akait
Copy link
Collaborator Author

Try to test $var1 + $var2 + $var3 + $var4 + $var5; and look on offset

@ichiriac
Copy link
Member

Ok, got it, the problem is not on vars location, but on bin nodes

@ichiriac ichiriac added bug RELEASE-READY Waiting to release and removed investigating labels Nov 21, 2018
@ichiriac
Copy link
Member

it's resolved, now offsets are correctly updated - it's fixed also on retif, cast and assign

@ichiriac
Copy link
Member

ichiriac commented Jan 7, 2019

released in 3.0.0-prerelease.8

@ichiriac ichiriac closed this as completed Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AST bug RELEASE-READY Waiting to release
Projects
None yet
Development

No branches or pull requests

2 participants