code: @Nullable
    private static Node nameOfParam(Node param) {
      switch (param.getToken()) {
        case NAME:
          return param;
        case DEFAULT_VALUE:
          return nameOfParam(param.getFirstChild());
        case REST:
          return nameOfParam(param.getOnlyChild());
        case ARRAY_PATTERN:
        case OBJECT_PATTERN:
          return null;
        default:
          throw new IllegalStateException("Unexpected child of PARAM_LIST: " + param.toStringTree());
      }
    }
docs: Return the NAME node associated with a function parameter (the child of a PARAM_LIST), or null
  if there is no single name.