public static function fromJSON()

in codegen/syntax/FunctionCallExpression.hack [45:122]


  public static function fromJSON(
    dict<arraykey, mixed> $json,
    string $file,
    int $initial_offset,
    string $source,
    string $_type_hint,
  ): this {
    $offset = $initial_offset;
    $receiver = Node::fromJSON(
      ($json['function_call_receiver']) as dict<_, _>,
      $file,
      $offset,
      $source,
      'Node',
    );
    $receiver = $receiver as nonnull;
    $offset += $receiver->getWidth();
    $type_args = Node::fromJSON(
      ($json['function_call_type_args'] ?? dict['kind' => 'missing'])
        as dict<_, _>,
      $file,
      $offset,
      $source,
      'TypeArguments',
    );
    $offset += $type_args?->getWidth() ?? 0;
    $enum_class_label = Node::fromJSON(
      ($json['function_call_enum_class_label'] ?? dict['kind' => 'missing'])
        as dict<_, _>,
      $file,
      $offset,
      $source,
      'EnumClassLabelExpression',
    );
    $offset += $enum_class_label?->getWidth() ?? 0;
    $left_paren = Node::fromJSON(
      ($json['function_call_left_paren']) as dict<_, _>,
      $file,
      $offset,
      $source,
      'LeftParenToken',
    );
    $left_paren = $left_paren as nonnull;
    $offset += $left_paren->getWidth();
    $argument_list = Node::fromJSON(
      ($json['function_call_argument_list'] ?? dict['kind' => 'missing'])
        as dict<_, _>,
      $file,
      $offset,
      $source,
      'NodeList<ListItem<IExpression>>',
    );
    $offset += $argument_list?->getWidth() ?? 0;
    $right_paren = Node::fromJSON(
      ($json['function_call_right_paren']) as dict<_, _>,
      $file,
      $offset,
      $source,
      'RightParenToken',
    );
    $right_paren = $right_paren as nonnull;
    $offset += $right_paren->getWidth();
    $source_ref = shape(
      'file' => $file,
      'source' => $source,
      'offset' => $initial_offset,
      'width' => $offset - $initial_offset,
    );
    return new static(
      /* HH_IGNORE_ERROR[4110] */ $receiver,
      /* HH_IGNORE_ERROR[4110] */ $type_args,
      /* HH_IGNORE_ERROR[4110] */ $enum_class_label,
      /* HH_IGNORE_ERROR[4110] */ $left_paren,
      /* HH_IGNORE_ERROR[4110] */ $argument_list,
      /* HH_IGNORE_ERROR[4110] */ $right_paren,
      $source_ref,
    );
  }