findPathTo method
Returns the shortest path from source
to target
, if any.
Implementation
ParserPath? findPathTo(Parser source, Parser target) {
assert(parsers.contains(target), 'target is not part of the analyzer');
return findPath(source, (path) => path.target == target);
}