PreOrderVisit walks the expression graph and calls the visitor in pre-order (top-down).
(expr Expr, visitor Visitor)
| 178 | |
| 179 | // PreOrderVisit walks the expression graph and calls the visitor in pre-order (top-down). |
| 180 | func PreOrderVisit(expr Expr, visitor Visitor) { |
| 181 | visit(expr, visitor, preOrder, 0, 0) |
| 182 | } |
| 183 | |
| 184 | // ExceedsDepth determines whether the AST contains expressions nested deeper than the specified |
| 185 | // maxDepth. The root expression has depth 0, so a maxDepth of 250 permits expressions nested up |