code: private static boolean checkPreExpressions(
        Node n, Node expressionRoot, Predicate<Node> predicate) {
      for (Node p = n; p != expressionRoot; p = p.getParent()) {
        Node oldestSibling = p.getParent().getFirstChild();
        // Evaluate a destructuring assignment right-to-left.
        if (oldestSibling.isDestructuringPattern()) {
          if (p.isDestructuringPattern()) {
            if (p.getNext() != null && predicate.apply(p.getNext())) {
              return true;
            }
          }
          continue;
        }
        for (Node cur = oldestSibling; cur != p; cur = cur.getNext()) {
          if (predicate.apply(cur)) {
            return true;
          }
        }
      }
      return false;
    }
docs: Given an expression by its root and sub-expression n, return true if the predicate is true for
  some expression evaluated before n.
  
  <p>In most cases evaluation order follows left-to-right AST order. Destructuring pattern
  evaluation is an exception.
  
  <p>Example:
  
  <p>Checked(), Checked(), n, NotChecked(), NotChecked();