code: static Node getConditionExpression(Node n) {
      switch (n.getToken()) {
        case IF:
        case WHILE:
          return n.getFirstChild();
        case DO:
          return n.getLastChild();
        case FOR:
          return n.getSecondChild();
        case FOR_IN:
        case FOR_OF:
        case FOR_AWAIT_OF:
        case CASE:
          return null;
        default:
          break;
      }
      throw new IllegalArgumentException(n + " does not have a condition.");
    }
docs: Gets the condition of an ON_TRUE / ON_FALSE CFG edge.
  @param n a node with an outgoing conditional CFG edge
  @return the condition node or null if the condition is not obviously a node