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

Precedence of exponentiation operator #548

Closed
czosel opened this issue May 10, 2020 · 0 comments · Fixed by #549
Closed

Precedence of exponentiation operator #548

czosel opened this issue May 10, 2020 · 0 comments · Fixed by #549

Comments

@czosel
Copy link
Collaborator

czosel commented May 10, 2020

Hi @ichiriac

In the PHP plugin for prettier an issue with the precedence of the exponentiation operator (**) was reported (prettier/plugin-php#1421):

Input:

1 + 2 ** 3;
1 ** 2 + 3;

The first expression is parsed incorrectly as (1+2)**3, the second correctly as (1**2)+3 (see playground)

Screenshot from 2020-05-10 13-07-02

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 a pull request may close this issue.

1 participant