fn push_expr(&mut self, expr: &'expr Expr) {
        self.stack.push(Frame::PostExpr(expr));
        match &expr.kind {
            &ExprKind::BinOp(ref l, _, ref r) => {
                self.stack.push(Frame::PreExpr(&r));
                self.stack.push(Frame::PreExpr(&l));
            }
            &ExprKind::UnaryOp(_, ref e) => {
                self.stack.push(Frame::PreExpr(&e));
            }
            &ExprKind::Capture(ref e, _) => {
                self.stack.push(Frame::PreExpr(&e));
            }
            &ExprKind::Block(ref ss, ref e) => {
                self.stack.push(Frame::PreExpr(&e));
                for s in ss.iter().rev() {
                    self.stack.push(Frame::PreStmt(&s));
                }
            }

            &ExprKind::Lambda {
                ref expr,
                free_vars: _,
            } => {
                self.stack.push(Frame::PreExpr(&expr.body));
            }

            &ExprKind::Apply { ref func, ref args } => {
                for ref a in args.iter().rev() {
                    self.stack.push(Frame::PreExpr(&a));
                }
                self.stack.push(Frame::PreExpr(&func));
            }

            &ExprKind::Var(_)
            | &ExprKind::RegexLiteral(_)
            | &ExprKind::IntLiteral(_)
            | &ExprKind::ExprPoison => {}
        }
    }
/// Push a Post node for the given expression, then a Pre node
/// for all of its children in reverse order.
Push a Post node for the given expression, then a Pre node
for all of its children in reverse order.
Push a Post node for the given expression then a Pre node for all of its children in reverse order .
fn push_expr(&mut self, expr: &'expr Expr) {
        self.stack.push(Frame::PostExpr(expr));
        match &expr.kind {
            &ExprKind::BinOp(ref l, _, ref r) => {
                self.stack.push(Frame::PreExpr(&r));
                self.stack.push(Frame::PreExpr(&l));
            }
            &ExprKind::UnaryOp(_, ref e) => {
                self.stack.push(Frame::PreExpr(&e));
            }
            &ExprKind::Capture(ref e, _) => {
                self.stack.push(Frame::PreExpr(&e));
            }
            &ExprKind::Block(ref ss, ref e) => {
                self.stack.push(Frame::PreExpr(&e));
                for s in ss.iter().rev() {
                    self.stack.push(Frame::PreStmt(&s));
                }
            }
            &ExprKind::Lambda {
                ref expr,
                free_vars: _,
            } => {
                self.stack.push(Frame::PreExpr(&expr.body));
            }
            &ExprKind::Apply { ref func, ref args } => {
                for ref a in args.iter().rev() {
                    self.stack.push(Frame::PreExpr(&a));
                }
                self.stack.push(Frame::PreExpr(&func));
            }
            &ExprKind::Var(_)
            | &ExprKind::RegexLiteral(_)
            | &ExprKind::IntLiteral(_)
            | &ExprKind::ExprPoison => {}
        }
    }
fn push_expr ( & mut self , expr : & ' expr Expr ) { self . stack . push ( Frame :: PostExpr ( expr ) ) ; match & expr . kind { & ExprKind :: BinOp ( ref l , _ , ref r ) => { self . stack . push ( Frame :: PreExpr ( & r ) ) ; self . stack . push ( Frame :: PreExpr ( & l ) ) ; } & ExprKind :: UnaryOp ( _ , ref e ) => { self . stack . push ( Frame :: PreExpr ( & e ) ) ; } & ExprKind :: Capture ( ref e , _ ) => { self . stack . push ( Frame :: PreExpr ( & e ) ) ; } & ExprKind :: Block ( ref ss , ref e ) => { self . stack . push ( Frame :: PreExpr ( & e ) ) ; for s in ss . iter ( ) . rev ( ) { self . stack . push ( Frame :: PreStmt ( & s ) ) ; } } & ExprKind :: Lambda { ref expr , free_vars : _ , } => { self . stack . push ( Frame :: PreExpr ( & expr . body ) ) ; } & ExprKind :: Apply { ref func , ref args } => { for ref a in args . iter ( ) . rev ( ) { self . stack . push ( Frame :: PreExpr ( & a ) ) ; } self . stack . push ( Frame :: PreExpr ( & func ) ) ; } & ExprKind :: Var ( _ ) | & ExprKind :: RegexLiteral ( _ ) | & ExprKind :: IntLiteral ( _ ) | & ExprKind :: ExprPoison => { } } }
Push a Post node for the given expression, then a Pre node
for all of its children in reverse order.
Push a Post node for the given expression then a Pre node for all of its children in reverse order .
&mut self
expr
&'expr Expr