-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
Labels:
The existing Expression walk always operates with visit methods that take 'Expression*' and allows replacement of the current Expression node. We should add an overload which accepts walkers with 'const Expression&' visit methods and disallows node replacement for read-only use cases.
When we work on this ticket and modify the entrypoint to the walk function we should consider changing the mutable walk syntax from
if (auto changed = walk(&walker, root.get()))
root = changed.release();
to something like
root = walk(&walker, std::move(root));