use crate::syn::ast::*; pub trait Accept { fn accept(&self, visitor: &mut V) -> V::Out; } pub trait DefaultAccept { fn default_accept(&self, visitor: &mut V) -> V::Out; } pub trait Visit { type Out; fn visit_stmt(&mut self, stmt: &Stmt) -> Self::Out; fn visit_assign_stmt(&mut self, assign: &AssignStmt) -> Self::Out; fn visit_lhs_expr(&mut self, lhs_expr: &LhsExpr) -> Self::Out; fn visit_expr(&mut self, expr: &Expr) -> Self::Out; fn visit_bin_expr(&mut self, expr: &BinExpr) -> Self::Out; fn visit_un_expr(&mut self, expr: &UnExpr) -> Self::Out; fn visit_call_expr(&mut self, expr: &CallExpr) -> Self::Out; fn visit_index_expr(&mut self, expr: &IndexExpr) -> Self::Out; fn visit_access_expr(&mut self, expr: &AccessExpr) -> Self::Out; fn visit_atom(&mut self, atom: &Atom) -> Self::Out; }