Skip to content
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

Add support for traversing AST using C #2543

Closed
k0va1 opened this issue Mar 3, 2024 · 4 comments · Fixed by #2555
Closed

Add support for traversing AST using C #2543

k0va1 opened this issue Mar 3, 2024 · 4 comments · Fixed by #2555

Comments

@k0va1
Copy link
Contributor

k0va1 commented Mar 3, 2024

Hi! Prism's C public API doesn't support any traversal features so it's quite tedious to find specific node after parsing(using switch ... case as in the prettyprint_node function). It would be great to have such an opportunity

@kddnewton
Copy link
Collaborator

Can you describe a little more about your use case/why you need this in C? All of our binding libraries have visitors.

@k0va1
Copy link
Contributor Author

k0va1 commented Mar 3, 2024

Yes, sure. I'm building a tool using plain C so I don't use any bindings for other languages. I understand that it might be out of scope and I've already written a traversal by myself but I think it would be great to have a build-in approach for such thinks because it's quite common task

WDYT?

@kddnewton
Copy link
Collaborator

Sure. I've opened a PR

@k0va1
Copy link
Contributor Author

k0va1 commented Mar 5, 2024

@kddnewton thanks a lot!

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

Successfully merging a pull request may close this issue.

2 participants