averycrespi / yolk

Numerical computing for Yolol
https://yolk.crespi.dev
Apache License 2.0
1 stars 0 forks source link

Incorrect precedence #53

Closed averycrespi closed 5 years ago

averycrespi commented 5 years ago
import a
let b = 1 - (2-a)
export b

produces b=1-2-a, but should produce b=1-2+a, or at least b=1-(2-a)

averycrespi commented 5 years ago

Problem with formatter: when formatting non-commutative operations, parenthesized should also be added if precedence is equal

averycrespi commented 5 years ago

Should also add formatter tests at same time