Enum pupil::op::Order
[−]
[src]
#[repr(i8)]pub enum Order { FnBarrier, Operators, AddSub, MulDiv, IMul, Pow, PowRightAssoc, Unary, }
Operator precedence.
Variants
FnBarrier
Function barrier hack.
Prevents precedence rules from pushing past a function application.
Only an explicit closing )
can push past it.
Operators
Lowest precedence for operators, helper for FnBarrier
.
AddSub
Addition and subtraction precedence.
MulDiv
Multiplication and division precedence.
IMul
Implicit multiplication precedence.
This makes implicit mul bind tightly under division allowing 1/2ans
to be evaulated as 1/(2*ans)
.
But not high enough to overpower exponentiation so 2ans^3
will be evaluated as 2*(ans^3)
.
Pow
Exponentiation precedence.
PowRightAssoc
Helper for Pow
’s right associativity.
Unary
Unary operator precedence.
Trait Implementations
impl Copy for Order
[src]
impl Clone for Order
[src]
fn clone(&self) -> Order
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Order
[src]
impl Eq for Order
[src]
impl PartialEq for Order
[src]
fn eq(&self, __arg_0: &Order) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Ord for Order
[src]
fn cmp(&self, __arg_0: &Order) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialOrd for Order
[src]
fn partial_cmp(&self, __arg_0: &Order) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more