fn eval_expr_as_number(&mut self, expr: &'a Expr) -> Result<Option<Number>> {
        if !expr.filters.is_empty() {
            match *self.eval_expression(expr)? {
                Value::Number(ref s) => Ok(Some(s.clone())),
                _ => bail!("Tried to do math with an expression not resulting in a number"),
            }
        } else {
            self.eval_as_number(&expr.val)
        }
    }
/// In some cases, we will have filters in lhs/rhs of a math expression
/// `eval_as_number` only works on ExprVal rather than Expr
In some cases, we will have filters in lhs/rhs of a math expression
`eval_as_number` only works on ExprVal rather than Expr
In some cases we will have filters in lhs / rhs of a math expression ` eval_as_number ` only works on ExprVal rather than Expr
fn eval_expr_as_number(&mut self, expr: &'a Expr) -> Result<Option<Number>> {
        if !expr.filters.is_empty() {
            match *self.eval_expression(expr)? {
                Value::Number(ref s) => Ok(Some(s.clone())),
                _ => bail!("Tried to do math with an expression not resulting in a number"),
            }
        } else {
            self.eval_as_number(&expr.val)
        }
    }
fn eval_expr_as_number ( & mut self , expr : & ' a Expr ) -> Result < Option < Number > > { if ! expr . filters . is_empty ( ) { match * self . eval_expression ( expr ) ? { Value :: Number ( ref s ) => Ok ( Some ( s . clone ( ) ) ) , _ => bail ! ( " " ) , } } else { self . eval_as_number ( & expr . val ) } }
In some cases, we will have filters in lhs/rhs of a math expression
`eval_as_number` only works on ExprVal rather than Expr
In some cases we will have filters in lhs / rhs of a math expression ` eval_as_number ` only works on ExprVal rather than Expr
&mut self
expr
&'a Expr
&mut self
expr
&'a Expr