Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diviner/atomizer/DivinerPHPAtomizer.php
| <?php | <?php | ||||
| final class DivinerPHPAtomizer extends DivinerAtomizer { | final class DivinerPHPAtomizer extends DivinerAtomizer { | ||||
| protected function newAtom($type) { | protected function newAtom($type) { | ||||
| return parent::newAtom($type)->setLanguage('php'); | return parent::newAtom($type)->setLanguage('php'); | ||||
| } | } | ||||
| protected function executeAtomize($file_name, $file_data) { | protected function executeAtomize($file_name, $file_data) { | ||||
| $future = xhpast_get_parser_future($file_data); | $future = PhutilXHPASTBinary::getParserFuture($file_data); | ||||
| $tree = XHPASTTree::newFromDataAndResolvedExecFuture( | $tree = XHPASTTree::newFromDataAndResolvedExecFuture( | ||||
| $file_data, | $file_data, | ||||
| $future->resolve()); | $future->resolve()); | ||||
| $atoms = array(); | $atoms = array(); | ||||
| $root = $tree->getRootNode(); | $root = $tree->getRootNode(); | ||||
| $func_decl = $root->selectDescendantsOfType('n_FUNCTION_DECLARATION'); | $func_decl = $root->selectDescendantsOfType('n_FUNCTION_DECLARATION'); | ||||
| ▲ Show 20 Lines • Show All 309 Lines • Show Last 20 Lines | |||||