findMatchingNode method

TargetNode? findMatchingNode(
  1. Match match,
  2. int index
)

Implementation

TargetNode? findMatchingNode(Match match, int index) {
  if (index < match.paths[0].length) {
    for (var child in children) {
      if (child.accessor == match.paths[0][index]) {
        return child.findMatchingNode(match, index + 1);
    }
      }
  } // if

  return this;
}