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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user