lookup method

ProgramInfoNode? lookup(
  1. List<String> path
)

Lookup a node in the program given a path to it.

Implementation

ProgramInfoNode? lookup(List<String> path) {
  var n = root;
  for (var p in path) {
    final next = n.children[p];
    if (next == null) {
      return null;
    }
    n = next;
  }
  return n;
}