fix: move where we call the with in traverse_tree_with
This commit is contained in:
parent
dba0e11ba7
commit
65984ed15b
|
@ -1386,12 +1386,8 @@ impl AirTree {
|
|||
) {
|
||||
let mut index_count = IndexCounter::new();
|
||||
tree_path.push(current_depth, depth_index);
|
||||
with(self, tree_path);
|
||||
match self {
|
||||
AirTree::Statement {
|
||||
statement,
|
||||
hoisted_over: Some(hoisted_over),
|
||||
} => {
|
||||
|
||||
if let AirTree::Statement { statement, .. } = self {
|
||||
match statement {
|
||||
AirStatement::Let { value, .. } => {
|
||||
value.do_traverse_tree_with(
|
||||
|
@ -1478,7 +1474,15 @@ impl AirTree {
|
|||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
with(self, tree_path);
|
||||
|
||||
match self {
|
||||
AirTree::Statement {
|
||||
hoisted_over: Some(hoisted_over),
|
||||
..
|
||||
} => {
|
||||
hoisted_over.do_traverse_tree_with(
|
||||
tree_path,
|
||||
current_depth + 1,
|
||||
|
|
Loading…
Reference in New Issue