z7zmey / php-parser

PHP parser written in Go
https://php-parser.com
MIT License
941 stars 63 forks source link

AST of parent class #126

Open ervishal opened 3 years ago

ervishal commented 3 years ago

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!

z7zmey commented 3 years ago

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.