code: static boolean allResultsMatch(Node n, Predicate<Node> p) {
      switch (n.getToken()) {
        case CAST:
          return allResultsMatch(n.getFirstChild(), p);
        case ASSIGN:
        case COMMA:
          return allResultsMatch(n.getLastChild(), p);
        case AND:
        case OR:
          return allResultsMatch(n.getFirstChild(), p)
              && allResultsMatch(n.getLastChild(), p);
        case HOOK:
          return allResultsMatch(n.getSecondChild(), p)
              && allResultsMatch(n.getLastChild(), p);
        default:
          return p.apply(n);
      }
    }
docs: Apply the supplied predicate against
  all possible result Nodes of the expression.