public function rewriteChildren()

in codegen/syntax/AliasDeclaration.hack [163:204]


  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);
    $keyword = $rewriter($this->_keyword, $parents);
    $name = $rewriter($this->_name, $parents);
    $generic_parameter = $this->_generic_parameter === null
      ? null
      : $rewriter($this->_generic_parameter, $parents);
    $constraint = $this->_constraint === null
      ? null
      : $rewriter($this->_constraint, $parents);
    $equal = $rewriter($this->_equal, $parents);
    $type = $rewriter($this->_type, $parents);
    $semicolon = $rewriter($this->_semicolon, $parents);
    if (
      $attribute_spec === $this->_attribute_spec &&
      $keyword === $this->_keyword &&
      $name === $this->_name &&
      $generic_parameter === $this->_generic_parameter &&
      $constraint === $this->_constraint &&
      $equal === $this->_equal &&
      $type === $this->_type &&
      $semicolon === $this->_semicolon
    ) {
      return $this;
    }
    return new static(
      $attribute_spec as ?OldAttributeSpecification,
      $keyword as Token,
      $name as NameToken,
      $generic_parameter as ?TypeParameters,
      $constraint as ?TypeConstraint,
      $equal as EqualToken,
      $type as ITypeSpecifier,
      $semicolon as SemicolonToken,
    );
  }