The node to traverse.
The callback function to apply to each statement, also passes the accumulator.
The initial value of the accumulator.
If true, only traverse statements at the current level without going into nested statements.
The final value of the accumulator after processing all statements.
Recursively iterates over each statement in an ASTNode and applies a callback to each statement.