1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Show node IDs in XHPAST tree view

Summary: Currently we do not show node IDs in this view, but do show token IDs in the stream view. Given that this view facilitates testing various XHPAST functionality, it would be useful to add this information.

Test Plan: Saw node IDs in XHPAST.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14697
This commit is contained in:
Joshua Spence 2015-12-23 08:39:23 +11:00
parent 8752bd4966
commit 15550b5582
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ final class PhabricatorXHPASTViewStreamController
foreach ($tree->getRawTokenStream() as $id => $token) {
$seq = $id;
$name = $token->getTypeName();
$title = pht('Token %s: %s', $seq, $name);
$title = pht('Token %d: %s', $seq, $name);
$tokens[] = phutil_tag(
'span',

View file

@ -29,7 +29,7 @@ final class PhabricatorXHPASTViewTreeController
protected function buildTree($root) {
try {
$name = $root->getTypeName();
$title = $root->getDescription();
$title = pht('Node %d: %s', $root->getID(), $name);
} catch (Exception $ex) {
$name = '???';
$title = '???';