Skip to content
This repository has been archived by the owner on May 27, 2023. It is now read-only.

Bracket insertion is messy / inefficient #6

Open
aantthony opened this issue Apr 6, 2014 · 0 comments
Open

Bracket insertion is messy / inefficient #6

aantthony opened this issue Apr 6, 2014 · 0 comments

Comments

@aantthony
Copy link
Owner

In order to quickly fix compilation of x - (y - z), I made it always insert the parentheses if the operator is not associative or the precedence requires it.

Each operator has an associative property which signifies the direction that it is grouped in, but it only needs to insert the parentheses if the precedence requires it, or the associative property is non-zero and points in the other direction.

@aantthony aantthony changed the title Parenthesis insertion is messy / inefficient Bracket insertion is messy / inefficient Apr 6, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant