/// Get the precedence for the current operator.
Get the precedence for the current operator.
Get the precedence for the current operator .
pub(super) fn precedence(self) -> usize {
        // NB: Rules from: https://doc.rust-lang.org/reference/expressions.html#expression-precedence
        match self {
            Self::Is | Self::IsNot => 12,
            Self::Mul | Self::Div | Self::Rem => 11,
            Self::Add | Self::Sub => 10,
            Self::Shl | Self::Shr => 9,
            Self::BitAnd => 8,
            Self::BitXor => 7,
            Self::BitOr => 6,
            Self::Eq | Self::Neq | Self::Lt | Self::Gt | Self::Lte | Self::Gte => 5,
            Self::And => 4,
            Self::Or => 3,
            Self::DotDot | Self::DotDotEq => 2,
            // assign operators
            _ => 1,
        }
    }
pub ( super ) fn precedence ( self ) -> usize { // NB: Rules from: https://doc.rust-lang.org/reference/expressions.html#expression-precedence match self { Self :: Is | Self :: IsNot => 12 , Self :: Mul | Self :: Div | Self :: Rem => 11 , Self :: Add | Self :: Sub => 10 , Self :: Shl | Self :: Shr => 9 , Self :: BitAnd => 8 , Self :: BitXor => 7 , Self :: BitOr => 6 , Self :: Eq | Self :: Neq | Self :: Lt | Self :: Gt | Self :: Lte | Self :: Gte => 5 , Self :: And => 4 , Self :: Or => 3 , Self :: DotDot | Self :: DotDotEq => 2 , // assign operators _ => 1 , } }
Get the precedence for the current operator.
Get the precedence for the current operator .
self