public static function fromJSON()

in codegen/syntax/DoStatement.hack [48:135]


  public static function fromJSON(
    dict<arraykey, mixed> $json,
    string $file,
    int $initial_offset,
    string $source,
    string $_type_hint,
  ): this {
    $offset = $initial_offset;
    $keyword = Node::fromJSON(
      ($json['do_keyword']) as dict<_, _>,
      $file,
      $offset,
      $source,
      'DoToken',
    );
    $keyword = $keyword as nonnull;
    $offset += $keyword->getWidth();
    $body = Node::fromJSON(
      ($json['do_body']) as dict<_, _>,
      $file,
      $offset,
      $source,
      'IStatement',
    );
    $body = $body as nonnull;
    $offset += $body->getWidth();
    $while_keyword = Node::fromJSON(
      ($json['do_while_keyword']) as dict<_, _>,
      $file,
      $offset,
      $source,
      'WhileToken',
    );
    $while_keyword = $while_keyword as nonnull;
    $offset += $while_keyword->getWidth();
    $left_paren = Node::fromJSON(
      ($json['do_left_paren']) as dict<_, _>,
      $file,
      $offset,
      $source,
      'LeftParenToken',
    );
    $left_paren = $left_paren as nonnull;
    $offset += $left_paren->getWidth();
    $condition = Node::fromJSON(
      ($json['do_condition']) as dict<_, _>,
      $file,
      $offset,
      $source,
      'IExpression',
    );
    $condition = $condition as nonnull;
    $offset += $condition->getWidth();
    $right_paren = Node::fromJSON(
      ($json['do_right_paren']) as dict<_, _>,
      $file,
      $offset,
      $source,
      'RightParenToken',
    );
    $right_paren = $right_paren as nonnull;
    $offset += $right_paren->getWidth();
    $semicolon = Node::fromJSON(
      ($json['do_semicolon']) as dict<_, _>,
      $file,
      $offset,
      $source,
      'SemicolonToken',
    );
    $semicolon = $semicolon as nonnull;
    $offset += $semicolon->getWidth();
    $source_ref = shape(
      'file' => $file,
      'source' => $source,
      'offset' => $initial_offset,
      'width' => $offset - $initial_offset,
    );
    return new static(
      /* HH_IGNORE_ERROR[4110] */ $keyword,
      /* HH_IGNORE_ERROR[4110] */ $body,
      /* HH_IGNORE_ERROR[4110] */ $while_keyword,
      /* HH_IGNORE_ERROR[4110] */ $left_paren,
      /* HH_IGNORE_ERROR[4110] */ $condition,
      /* HH_IGNORE_ERROR[4110] */ $right_paren,
      /* HH_IGNORE_ERROR[4110] */ $semicolon,
      $source_ref,
    );
  }