Closed rutefig closed 3 months ago
The circom documentation references the rust documentation about precendence: https://docs.circom.io/circom-language/basic-operators/ https://doc.rust-lang.org/1.22.1/reference/expressions/operator-expr.html#operator-precedence
This does not explain the precedence of **, ~ so we need to investigate which is actually in circom
The circom documentation references the rust documentation about precendence: https://docs.circom.io/circom-language/basic-operators/ https://doc.rust-lang.org/1.22.1/reference/expressions/operator-expr.html#operator-precedence
This does not explain the precedence of **, ~ so we need to investigate which is actually in circom
Yeah I checked the lalrop file, ~
is a unary operator so it has the same precedence as the rest of unary operators, and pow **
comes before the mul and div group, right after the unary operators.
Regarding the groups I agree it should all be grouped :) gonna do it right away
Added missing logic, arithmetic and bitwise operators to lalrop and ast.
Covers #205 and #216 issues