php-parser icon indicating copy to clipboard operation
php-parser copied to clipboard

AST of parent class

Open ervishal opened this issue 3 years ago • 1 comments

can we get the AST of parent class?

class Dummy extends BaseElement {/**/}

here we are able to get AST of Dummy but not the AST of parent class BaseElement.

any function in php-parser itself to get that? otherwise need to find the path in filesystem and do the same thing.

thanks in advance!

ervishal avatar Mar 11 '21 13:03 ervishal

Hi @ervishal. This library does not provide search features but low-level language parsing. For now, you should parse the file that contains the parent class and traverse its AST to the needed node.

z7zmey avatar Mar 29 '21 07:03 z7zmey