Skip to content

AST of parent class #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ervishal opened this issue Mar 11, 2021 · 1 comment
Open

AST of parent class #126

ervishal opened this issue Mar 11, 2021 · 1 comment

Comments

@ervishal
Copy link

ervishal commented Mar 11, 2021

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
Copy link
Owner

z7zmey commented Mar 29, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants