mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
Use PhutilXHPASTBinary
methods
Summary: Use `PhutilXHPASTBinary` methods instead of `xhpast_parse` functions. Depends on D11517. Test Plan: N/A, this is a direct swap. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11612
This commit is contained in:
parent
37e534c5f8
commit
7982b23eb4
4 changed files with 4 additions and 4 deletions
|
@ -20,7 +20,7 @@ $futures = array();
|
|||
foreach ($input as $file) {
|
||||
$file = Filesystem::readablePath($file);
|
||||
$data[$file] = Filesystem::readFile($file);
|
||||
$futures[$file] = xhpast_get_parser_future($data[$file]);
|
||||
$futures[$file] = PhutilXHPASTBinary::getParserFuture($data[$file]);
|
||||
}
|
||||
|
||||
$futures = id(new FutureIterator($futures))
|
||||
|
|
|
@ -7,7 +7,7 @@ final class DivinerPHPAtomizer extends DivinerAtomizer {
|
|||
}
|
||||
|
||||
protected function executeAtomize($file_name, $file_data) {
|
||||
$future = xhpast_get_parser_future($file_data);
|
||||
$future = PhutilXHPASTBinary::getParserFuture($file_data);
|
||||
$tree = XHPASTTree::newFromDataAndResolvedExecFuture(
|
||||
$file_data,
|
||||
$future->resolve());
|
||||
|
|
|
@ -11,7 +11,7 @@ final class PhabricatorXHPASTViewRunController
|
|||
if ($request->isFormPost()) {
|
||||
$source = $request->getStr('source');
|
||||
|
||||
$future = xhpast_get_parser_future($source);
|
||||
$future = PhutilXHPASTBinary::getParserFuture($source);
|
||||
$resolved = $future->resolve();
|
||||
|
||||
// This is just to let it throw exceptions if stuff is broken.
|
||||
|
|
|
@ -31,7 +31,7 @@ final class PhabricatorInternationalizationManagementExtractWorkflow
|
|||
foreach ($path_files as $file) {
|
||||
$full_path = $root.DIRECTORY_SEPARATOR.$file;
|
||||
$data = Filesystem::readFile($full_path);
|
||||
$futures[$full_path] = xhpast_get_parser_future($data);
|
||||
$futures[$full_path] = PhutilXHPASTBinary::getParserFuture($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue