grol-io / grol

Go REPL Open Language
https://grol.io
Apache License 2.0
22 stars 2 forks source link

Simplify expression using precedence #183

Closed ldemailly closed 2 months ago

ldemailly commented 2 months ago

before:

        ---input---
        1+2+3+4*5==a[i+2]
        ---expected---
        1 + 2 + 3 + 4 * 5 == a[i + 2]
        ---actual---
        (((1 + 2) + 3) + (4 * 5)) == (a[(i + 2)])

fixes #181