Struct pest::prec_climber::Operator
source · pub struct Operator<R: RuleType> { /* private fields */ }
👎Deprecated since 2.4.0: Use
pest::pratt_parser
instead (it is an equivalent which also supports unary prefix/suffix operators).
While prec_climber is going to be kept in 2.x minor and patch releases, it may be removed in a future major release.Expand description
Infix operator used in PrecClimber
.
Implementations§
source§impl<R: RuleType> Operator<R>
impl<R: RuleType> Operator<R>
sourcepub fn new(rule: R, assoc: Assoc) -> Operator<R>
👎Deprecated since 2.4.0: Use pest::pratt_parser
instead (it is an equivalent which also supports unary prefix/suffix operators).
While prec_climber is going to be kept in 2.x minor and patch releases, it may be removed in a future major release.
pub fn new(rule: R, assoc: Assoc) -> Operator<R>
pest::pratt_parser
instead (it is an equivalent which also supports unary prefix/suffix operators).
While prec_climber is going to be kept in 2.x minor and patch releases, it may be removed in a future major release.Creates a new Operator
from a Rule
and Assoc
.
Examples
Operator::new(Rule::plus, Assoc::Left) | Operator::new(Rule::minus, Assoc::Right);