findAllPaths method

Iterable<ParserPath> findAllPaths(
  1. Parser source,
  2. bool predicate(
    1. ParserPath path
    )
)

Returns all paths starting at source that satisfy the given predicate.

Implementation

Iterable<ParserPath> findAllPaths(
  Parser source,
  bool Function(ParserPath path) predicate,
) {
  assert(parsers.contains(source), 'source is not part of the analyzer');
  return depthFirstSearch(source, predicate);
}