findPath method
Returns the shortest path from source that satisfies the given
predicate, if any.
Implementation
ParserPath? findPath(Parser source, Predicate<ParserPath> predicate) {
ParserPath? path;
for (final current in findAllPaths(source, predicate)) {
if (path == null || current.length < path.length) {
path = current;
}
}
return path;
}