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

Pretty-printing removes important parentheses from math #3

Open
jefdaj opened this issue Dec 26, 2019 · 1 comment
Open

Pretty-printing removes important parentheses from math #3

jefdaj opened this issue Dec 26, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@jefdaj
Copy link
Owner

jefdaj commented Dec 26, 2019

It parses + evaluates properly, but pretty-printing removes the parens:

shortcut —▶ 1 + 2 * 3
9

shortcut —▶ 1 + (2 * 3)
7

shortcut —▶ :show 
result = 1 + 2 * 3

shortcut —▶ result
7

shortcut —▶ 1 + 2 * 3
9

shortcut —▶ :show 
result = 1 + 2 * 3

shortcut —▶ result
9

If the script is saved and reloaded from text, the math is sometimes wrong.

@jefdaj jefdaj added the bug Something isn't working label Dec 26, 2019
@jefdaj
Copy link
Owner Author

jefdaj commented Dec 26, 2019

Add round-trip tests for these!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant