in codegen/syntax/UsingStatementBlockScoped.hack [43:120]
public static function fromJSON(
dict<arraykey, mixed> $json,
string $file,
int $initial_offset,
string $source,
string $_type_hint,
): this {
$offset = $initial_offset;
$await_keyword = Node::fromJSON(
($json['using_block_await_keyword'] ?? dict['kind' => 'missing'])
as dict<_, _>,
$file,
$offset,
$source,
'AwaitToken',
);
$offset += $await_keyword?->getWidth() ?? 0;
$using_keyword = Node::fromJSON(
($json['using_block_using_keyword']) as dict<_, _>,
$file,
$offset,
$source,
'UsingToken',
);
$using_keyword = $using_keyword as nonnull;
$offset += $using_keyword->getWidth();
$left_paren = Node::fromJSON(
($json['using_block_left_paren']) as dict<_, _>,
$file,
$offset,
$source,
'LeftParenToken',
);
$left_paren = $left_paren as nonnull;
$offset += $left_paren->getWidth();
$expressions = Node::fromJSON(
($json['using_block_expressions']) as dict<_, _>,
$file,
$offset,
$source,
'NodeList<ListItem<IExpression>>',
);
$expressions = $expressions as nonnull;
$offset += $expressions->getWidth();
$right_paren = Node::fromJSON(
($json['using_block_right_paren']) as dict<_, _>,
$file,
$offset,
$source,
'RightParenToken',
);
$right_paren = $right_paren as nonnull;
$offset += $right_paren->getWidth();
$body = Node::fromJSON(
($json['using_block_body']) as dict<_, _>,
$file,
$offset,
$source,
'CompoundStatement',
);
$body = $body as nonnull;
$offset += $body->getWidth();
$source_ref = shape(
'file' => $file,
'source' => $source,
'offset' => $initial_offset,
'width' => $offset - $initial_offset,
);
return new static(
/* HH_IGNORE_ERROR[4110] */ $await_keyword,
/* HH_IGNORE_ERROR[4110] */ $using_keyword,
/* HH_IGNORE_ERROR[4110] */ $left_paren,
/* HH_IGNORE_ERROR[4110] */ $expressions,
/* HH_IGNORE_ERROR[4110] */ $right_paren,
/* HH_IGNORE_ERROR[4110] */ $body,
$source_ref,
);
}