3 final class PhabricatorXHPASTViewStreamController
4 extends PhabricatorXHPASTViewPanelController
{
6 public function handleRequest(AphrontRequest
$request) {
7 $storage = $this->getStorageTree();
8 $input = $storage->getInput();
9 $err = $storage->getReturnCode();
10 $stdout = $storage->getStdout();
11 $stderr = $storage->getStderr();
14 $tree = XHPASTTree
::newFromDataAndResolvedExecFuture(
16 array($err, $stdout, $stderr));
17 } catch (XHPASTSyntaxErrorException
$ex) {
18 return $this->buildXHPASTViewPanelResponse($ex->getMessage());
22 foreach ($tree->getRawTokenStream() as $id => $token) {
24 $name = $token->getTypeName();
25 $title = pht('Token %d: %s', $seq, $name);
27 $tokens[] = phutil_tag(
36 return $this->buildXHPASTViewPanelResponse(
37 phutil_implode_html('', $tokens));