pest
pest copied to clipboard
make PrecClimber support prefix and postfix operators
Problem
The PrecClimber handles precedence between infix operators, like a + b * c
, but doesn't handle precedence between prefix or postfix operators, like -a.b + c
.
Expectation
The PrecClimber should be able to resolve prefix and postfix operators along with infix operators.
I'm looking at taking a shot at this. The plan is to add awareness of prefix or postfix to the Assoc enum or the Operator struct.
The Operator seems better but not sure if that will cause backwards compatibility issues and maybe the Assoc is less disruptive to the interface.
See also #344, https://crates.io/crates/pratt