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 JS AST querying with XPath #409

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

chalu
Copy link

@chalu chalu commented Jun 5, 2019

I added a transformation that allows the user query the AST from Javascript, using XPath. Hopefully, this can be the beginning of getting solid AST querying and across board in the AST Explorer tool.

Let me know what you think.
Thanks

@rajasegar
Copy link
Contributor

rajasegar commented Jun 6, 2019

@chalu
Thanks a lot for this PR, i think it greatly simplifies the AST querying , just had a look at astq repo, it is
super cool. However, we need a little bit info regarding the same like how you can query, etc., Can you please add some context info in README
@fkling I think that is OK if the PR gets merged
Also can you please remove all the .DS_Store files?

@chalu
Copy link
Author

chalu commented Jun 7, 2019

Thanks. Sorry about the .DS_Store files.
By README, are you referring to the main README here

I also got curious about a way to provide support for AST querying for other languages, but I guess that depends on first finding a good XPath query library for them.

@rajasegar
Copy link
Contributor

Yes

@chalu
Copy link
Author

chalu commented Jun 19, 2019

Kindly review and let me know how the latest changes address the previous concerns and if there's any more feedback.

Thanks.

@brettz9
Copy link

brettz9 commented Mar 6, 2020

This looks very useful--maybe an esquery tool could be added as well (the query tool behind eslint's selectors)!

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 this pull request may close these issues.

3 participants