Carpet

Carpet

2M Downloads

[Expression Optimizer] Incorrectly removing parenthesis/priority

altrisi opened this issue ยท 3 comments

commented

Simplest example:
'a' + (1 + 1) ==> a11

In my use case one of the numbers comes from a variable, same output.

commented

@altrisi You can take a look on the commit to see if that's what you tried

commented

ok, its the optimizer not taking into account associativity. Should be not that hard. I am AFK for a few more days, but will look into when I am back. Or you would want to have a look at it?

commented

I could try, but since I have almost no idea in how the optimizer (and the internal parsing and loading of Scarpet) works, if I can't find it I'll end up just waiting.

Edit: I gave up