FIX: visit_value and leave_value for lists and tuples

This commit is contained in:
Jeremy Wall 2020-08-19 19:43:33 -04:00 committed by Jeremy Wall
parent 44986be0f5
commit 97c3a30973

View File

@ -181,6 +181,7 @@ pub trait Walker: Visitor {
}
fn walk_value(&mut self, val: &mut Value) {
self.visit_value(val);
match val {
Value::Empty(_)
| Value::Symbol(_)
@ -188,8 +189,7 @@ pub trait Walker: Visitor {
| Value::Int(_)
| Value::Float(_)
| Value::Str(_) => {
self.visit_value(val);
self.leave_value(val);
// noop
}
Value::Tuple(fs) => self.walk_fieldset(&mut fs.val),
Value::List(vs) => {
@ -198,6 +198,7 @@ pub trait Walker: Visitor {
}
}
}
self.leave_value(val);
}
}