From 645e1fe5830a3660ef80e3ea31d6b5b615e7e17f Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Thu, 11 Feb 2021 01:47:09 +0800 Subject: [PATCH] Add missing cases to Expr::walk. --- src/ast.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ast.rs b/src/ast.rs index 78d179de..0e4e4ee5 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -1488,10 +1488,15 @@ impl Expr { Self::Stmt(x, _) => x.iter().for_each(|s| s.walk(path, on_node)), Self::Array(x, _) => x.iter().for_each(|e| e.walk(path, on_node)), Self::Map(x, _) => x.iter().for_each(|(_, e)| e.walk(path, on_node)), - Self::Index(x, _) | Expr::In(x, _) | Expr::And(x, _) | Expr::Or(x, _) => { + Self::Index(x, _) + | Self::Dot(x, _) + | Expr::In(x, _) + | Expr::And(x, _) + | Expr::Or(x, _) => { x.lhs.walk(path, on_node); x.rhs.walk(path, on_node); } + Self::FnCall(x, _) => x.args.iter().for_each(|e| e.walk(path, on_node)), Self::Custom(x, _) => x.keywords.iter().for_each(|e| e.walk(path, on_node)), _ => (), }