/// Obtain the precedence of a binary operator.
Obtain the precedence of a binary operator.
Obtain the precedence of a binary operator .
fn binary_prec(op: ast::BinaryOp) -> ExprPrec {
    match op {
        ast::BinaryOp::Dir(_) => ExprPrec::Range,
        ast::BinaryOp::Logical(_) => ExprPrec::Logical,
        ast::BinaryOp::Rel(_) => ExprPrec::Relational,
        ast::BinaryOp::Match(_) => ExprPrec::Relational,
        ast::BinaryOp::Shift(_) => ExprPrec::Shift,
        ast::BinaryOp::Add => ExprPrec::Add,
        ast::BinaryOp::Sub => ExprPrec::Add,
        ast::BinaryOp::Concat => ExprPrec::Add,
        ast::BinaryOp::Mul => ExprPrec::Mul,
        ast::BinaryOp::Div => ExprPrec::Mul,
        ast::BinaryOp::Mod => ExprPrec::Mul,
        ast::BinaryOp::Rem => ExprPrec::Mul,
        ast::BinaryOp::Pow => ExprPrec::Pow,
    }
}
fn binary_prec ( op : ast :: BinaryOp ) -> ExprPrec { match op { ast :: BinaryOp :: Dir ( _ ) => ExprPrec :: Range , ast :: BinaryOp :: Logical ( _ ) => ExprPrec :: Logical , ast :: BinaryOp :: Rel ( _ ) => ExprPrec :: Relational , ast :: BinaryOp :: Match ( _ ) => ExprPrec :: Relational , ast :: BinaryOp :: Shift ( _ ) => ExprPrec :: Shift , ast :: BinaryOp :: Add => ExprPrec :: Add , ast :: BinaryOp :: Sub => ExprPrec :: Add , ast :: BinaryOp :: Concat => ExprPrec :: Add , ast :: BinaryOp :: Mul => ExprPrec :: Mul , ast :: BinaryOp :: Div => ExprPrec :: Mul , ast :: BinaryOp :: Mod => ExprPrec :: Mul , ast :: BinaryOp :: Rem => ExprPrec :: Mul , ast :: BinaryOp :: Pow => ExprPrec :: Pow , } }
Obtain the precedence of a binary operator.
Obtain the precedence of a binary operator .
op
ast::BinaryOp