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

Operator precedence #56

Closed
michallepicki opened this issue Dec 2, 2021 · 2 comments · Fixed by #57
Closed

Operator precedence #56

michallepicki opened this issue Dec 2, 2021 · 2 comments · Fixed by #57

Comments

@michallepicki
Copy link
Contributor

Currently it seems that mathematical operators + and - have the same precedence as * and / (it's probably the same for +. and friends). It should be probably changed so that e.g. parens are not needed in a + (b * c)? (Or is this per design?)

@gfngfn
Copy link
Owner

gfngfn commented Dec 2, 2021

Wow, It’s a simple mistake of the parser implementation! This is of course not intended.

The mistake is that + and - have higher precedence than * and /, not that they have the same.

It can be fixed with ease. Thank you for reporting!

@gfngfn
Copy link
Owner

gfngfn commented Dec 2, 2021

#57 will probably remedy this issue.

@gfngfn gfngfn closed this as completed in #57 Dec 5, 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 a pull request may close this issue.

2 participants