public function rewriteChildren()

in codegen/syntax/LambdaSignature.hack [146:183]


  public function rewriteChildren<Tret as ?Node>(
    (function(Node, vec<Node>): Tret) $rewriter,
    vec<Node> $parents = vec[],
  ): this {
    $parents[] = $this;
    $left_paren = $rewriter($this->_left_paren, $parents);
    $parameters = $this->_parameters === null
      ? null
      : $rewriter($this->_parameters, $parents);
    $right_paren = $rewriter($this->_right_paren, $parents);
    $contexts =
      $this->_contexts === null ? null : $rewriter($this->_contexts, $parents);
    $colon = $this->_colon === null ? null : $rewriter($this->_colon, $parents);
    $readonly_return = $this->_readonly_return === null
      ? null
      : $rewriter($this->_readonly_return, $parents);
    $type = $this->_type === null ? null : $rewriter($this->_type, $parents);
    if (
      $left_paren === $this->_left_paren &&
      $parameters === $this->_parameters &&
      $right_paren === $this->_right_paren &&
      $contexts === $this->_contexts &&
      $colon === $this->_colon &&
      $readonly_return === $this->_readonly_return &&
      $type === $this->_type
    ) {
      return $this;
    }
    return new static(
      $left_paren as LeftParenToken,
      /* HH_FIXME[4110] ?NodeList<ListItem<IParameter>> may not be enforceable */ $parameters,
      $right_paren as RightParenToken,
      $contexts as ?Contexts,
      $colon as ?ColonToken,
      $readonly_return as ?ReadonlyToken,
      $type as ?ITypeSpecifier,
    );
  }