Node traversal iterator (#3845)
authorAlex Ozdemir <aozdemir@hmc.edu>
Sat, 28 Mar 2020 06:22:41 +0000 (23:22 -0700)
committerGitHub <noreply@github.com>
Sat, 28 Mar 2020 06:22:41 +0000 (23:22 -0700)
commit9023d348d0f30fdd81805f224e77e90ecef1350d
treea8929284b8ab84328bee436a16065c2ba54e02cb
parent8ee4da5904e15c7900109a82ec126ce87715e548
Node traversal iterator (#3845)

Implement an iterator for pre- and post-order traversals.

I believe that this will be useful in pre-processing passes, many of
which do postorder traversals that they implement by hand.

Right now this iterator does not support modification of the traversal
pattern, but we could add this later on, if we want it.

Co-authored-by: Andres Noetzli <andres.noetzli@gmail.com>
Co-authored-by: Mathias Preiner <mathias.preiner@gmail.com>
src/expr/CMakeLists.txt
src/expr/node_traversal.cpp [new file with mode: 0644]
src/expr/node_traversal.h [new file with mode: 0644]
test/unit/expr/CMakeLists.txt
test/unit/expr/node_traversal_black.h [new file with mode: 0644]