Add overload with consts to Expression walk for read-only usage

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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));
      

            Assignee:
            Hana Pearlman
            Reporter:
            Jacob Evans (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: