shouldVisitNextChild method
This method is called after visiting each child in
{@link #visitChildren}. This method is first called before the first
child is visited; at that point currentResult
will be the initial
value (in the default implementation, the initial value is returned by a
call to {@link #defaultResult}. This method is not called after the last
child is visited.
The default implementation always returns [true], indicating that [visitChildren] should only return after all children are visited. One reason to override this method is to provide a "short circuit" evaluation option for situations where the result of visiting a single child has the potential to determine the result of the visit operation as a whole.
@param node The RuleNode
whose children are currently being
visited.
@param currentResult The current aggregate result of the children visited
to the current point.
@return true
to continue visiting children. Otherwise return
false
to stop visiting children and immediately return the
current aggregate result from {@link #visitChildren}.
Implementation
bool shouldVisitNextChild(RuleNode node, T? currentResult) => true;