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

+=, /=, etc. should respect order of operations #8

Open
cominixo opened this issue Oct 31, 2021 · 1 comment
Open

+=, /=, etc. should respect order of operations #8

cominixo opened this issue Oct 31, 2021 · 1 comment

Comments

@cominixo
Copy link
Contributor

These tokens should be processed with parentheses around the second value, for example, from a += b to a = a + (b), otherwise something like this:

a=2
a=a/(7-4/2)
print(a)
a=2
a/=7-4/2
print(a)

will print different things in pemsa, but they're the same value in PICO-8.

@egordorichev
Copy link
Owner

Man, I guess we do need a more advanced lua parser

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

No branches or pull requests

2 participants