HH\ExperimentalParserUtils\find_method_parameters

Instead of doing a full recursion like the lambda extractor, this function can do a shallow search of the tree to collect methods by name

namespace HH\ExperimentalParserUtils;

function find_method_parameters(
  \HH\ParseTree $json,
  string $method_name,
  int $line_number,
): MethodParametersNode;

If there is a tie, use the line number

Parameters

  • \HH\ParseTree $json
  • string $method_name
  • int $line_number

Returns

  • MethodParametersNode