pub fn children(&self) -> Vec<&Box<Expr>> {
        match &self.source {
            ExprSource::Paren { inner } => vec![inner],
            ExprSource::Literal { value: _ } => vec![],
            ExprSource::BinOp { op: _, left, right } => vec![left, right],
            ExprSource::BoolAnd { left, right } => vec![left, right],
            ExprSource::BoolOr { left, right } => vec![left, right],
            ExprSource::Implication { left, right } => vec![left, right],
            ExprSource::UnaryInvert { value } => vec![value],
            ExprSource::UnaryNegate { value } => vec![value],
        }
        .into_iter()
        .map(|x| x.as_ref())
        .filter_map(Result::ok)
        .collect()
    }
/// Used for recursing to find the Expr at a cursor position
Used for recursing to find the Expr at a cursor position
Used for recursing to find the Expr at a cursor position
pub fn children(&self) -> Vec<&Box<Expr>> {
        match &self.source {
            ExprSource::Paren { inner } => vec![inner],
            ExprSource::Literal { value: _ } => vec![],
            ExprSource::BinOp { op: _, left, right } => vec![left, right],
            ExprSource::BoolAnd { left, right } => vec![left, right],
            ExprSource::BoolOr { left, right } => vec![left, right],
            ExprSource::Implication { left, right } => vec![left, right],
            ExprSource::UnaryInvert { value } => vec![value],
            ExprSource::UnaryNegate { value } => vec![value],
        }
        .into_iter()
        .map(|x| x.as_ref())
        .filter_map(Result::ok)
        .collect()
    }
pub fn children ( & self ) -> Vec < & Box < Expr > > { match & self . source { ExprSource :: Paren { inner } => vec ! [ inner ] , ExprSource :: Literal { value : _ } => vec ! [ ] , ExprSource :: BinOp { op : _ , left , right } => vec ! [ left right ] , ExprSource :: BoolAnd { left , right } => vec ! [ left right ] , ExprSource :: BoolOr { left , right } => vec ! [ left right ] , ExprSource :: Implication { left , right } => vec ! [ left right ] , ExprSource :: UnaryInvert { value } => vec ! [ value ] , ExprSource :: UnaryNegate { value } => vec ! [ value ] , } . into_iter ( ) . map ( | x | x . as_ref ( ) ) . filter_map ( Result :: ok ) . collect ( ) }
Used for recursing to find the Expr at a cursor position
Used for recursing to find the Expr at a cursor position
&self
&self