public function rewriteChildren()

in codegen/syntax/TypeParameter.hack [131:168]


  public function rewriteChildren<Tret as ?Node>(
    (function(Node, vec<Node>): Tret) $rewriter,
    vec<Node> $parents = vec[],
  ): this {
    $parents[] = $this;
    $attribute_spec = $this->_attribute_spec === null
      ? null
      : $rewriter($this->_attribute_spec, $parents);
    $reified =
      $this->_reified === null ? null : $rewriter($this->_reified, $parents);
    $variance =
      $this->_variance === null ? null : $rewriter($this->_variance, $parents);
    $name = $rewriter($this->_name, $parents);
    $param_params = $this->_param_params === null
      ? null
      : $rewriter($this->_param_params, $parents);
    $constraints = $this->_constraints === null
      ? null
      : $rewriter($this->_constraints, $parents);
    if (
      $attribute_spec === $this->_attribute_spec &&
      $reified === $this->_reified &&
      $variance === $this->_variance &&
      $name === $this->_name &&
      $param_params === $this->_param_params &&
      $constraints === $this->_constraints
    ) {
      return $this;
    }
    return new static(
      $attribute_spec as ?OldAttributeSpecification,
      $reified as ?ReifyToken,
      $variance as ?Token,
      $name as NameToken,
      $param_params as ?TypeParameters,
      /* HH_FIXME[4110] ?NodeList<TypeConstraint> may not be enforceable */ $constraints,
    );
  }