presto-parser/src/main/java/io/prestosql/sql/util/AstUtils.java/AstUtils/preOrder
class AstUtils:    public static Stream<Node> preOrder(Node node)
    {
        return stream(
                Traverser.forTree((SuccessorsFunction<Node>) Node::getChildren)
                        .depthFirstPreOrder(requireNonNull(node, "node is null")));
    }