mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
In Diviner, parse "abstract" and "final" in PHP classes, interfaces and methods
Summary: Ref T988. Adds support for the "abstract" and "final" keywords in the atomizer. Test Plan: Looked at abstract/final stuff. Reviewers: btrahan, chad Reviewed By: chad CC: aran Maniphest Tasks: T988 Differential Revision: https://secure.phabricator.com/D6850
This commit is contained in:
parent
bf50e0f870
commit
1b6f71dec1
1 changed files with 5 additions and 1 deletions
|
@ -49,7 +49,11 @@ final class DivinerPHPAtomizer extends DivinerAtomizer {
|
|||
->setFile($file_name)
|
||||
->setLine($class->getLineNumber());
|
||||
|
||||
// TODO: Parse "abstract" and "final".
|
||||
// This parses "final" and "abstract".
|
||||
$attributes = $class->getChildByIndex(0, 'n_CLASS_ATTRIBUTES');
|
||||
foreach ($attributes->selectDescendantsOfType('n_STRING') as $attr) {
|
||||
$atom->setProperty($attr->getConcreteString(), true);
|
||||
}
|
||||
|
||||
// If this exists, it is n_EXTENDS_LIST.
|
||||
$extends = $class->getChildByIndex(2);
|
||||
|
|
Loading…
Reference in a new issue