code: private static EvaluationDirection getEvaluationDirection(Node node) {
      switch (node.getToken()) {
        case DESTRUCTURING_LHS:
        case ASSIGN:
        case DEFAULT_VALUE:
          if (node.getFirstChild().isDestructuringPattern()) {
            // The lhs of a destructuring assignment is evaluated AFTER the rhs. This is only true for
            // destructuring, though, not assignments like "first().x = second()" where "first()" is
            // evaluated first.
            return EvaluationDirection.REVERSE;
          }
          // fall through
        default:
          return EvaluationDirection.FORWARD;
      }
    }
docs: Returns the order in which the given node's children should be evaluated.
  
  <p>In most cases, this is EvaluationDirection.FORWARD because the AST order matches the actual
  evaluation order. A few nodes require reversed evaluation instead.