• Recursively iterates over each expression in an ASTNode and applies a callback to each expression.

    Type Parameters

    • T

    Parameters

    • node: AstNode

      The node to traverse.

    • callback: ((acc: T, expr: AstExpression) => T)

      The callback function to apply to each expression.

    • acc: T

      The initial value of the accumulator.

    • options: Partial<{
          shouldContinue: ((expr: AstExpression) => boolean);
      }> = {}

      Optional configuration for the traversal.

    Returns T

    The final value of the accumulator after processing all expressions.