public function rewriteChildren()

in codegen/syntax/ParameterDeclaration.hack [151:192]


  public function rewriteChildren<Tret as ?Node>(
    (function(Node, vec<Node>): Tret) $rewriter,
    vec<Node> $parents = vec[],
  ): this {
    $parents[] = $this;
    $attribute = $this->_attribute === null
      ? null
      : $rewriter($this->_attribute, $parents);
    $visibility = $this->_visibility === null
      ? null
      : $rewriter($this->_visibility, $parents);
    $call_convention = $this->_call_convention === null
      ? null
      : $rewriter($this->_call_convention, $parents);
    $readonly =
      $this->_readonly === null ? null : $rewriter($this->_readonly, $parents);
    $type = $this->_type === null ? null : $rewriter($this->_type, $parents);
    $name = $rewriter($this->_name, $parents);
    $default_value = $this->_default_value === null
      ? null
      : $rewriter($this->_default_value, $parents);
    if (
      $attribute === $this->_attribute &&
      $visibility === $this->_visibility &&
      $call_convention === $this->_call_convention &&
      $readonly === $this->_readonly &&
      $type === $this->_type &&
      $name === $this->_name &&
      $default_value === $this->_default_value
    ) {
      return $this;
    }
    return new static(
      $attribute as ?OldAttributeSpecification,
      $visibility as ?Token,
      $call_convention as ?InoutToken,
      $readonly as ?ReadonlyToken,
      $type as ?ITypeSpecifier,
      $name as IExpression,
      $default_value as ?SimpleInitializer,
    );
  }