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

Structure Query #3

Merged

Conversation

mattmassicotte
Copy link
Contributor

This adds a "structure.scm" query definition file. This can be used to find related syntactic elements and to drive a parse-tree-based indentation system.

gomod's grammar is pretty simple, so this one isn't to tricky. But, if you're interested in seeing something more complex, the version for Go was just merged.

@camdencheek
Copy link
Owner

Neat! Do you have examples of what you're using this for? I'm curious if you think this is a pattern that can be generalized across other languages.

@camdencheek camdencheek merged commit fe5c1e5 into camdencheek:main Mar 26, 2022
@mattmassicotte
Copy link
Contributor Author

I use this to back some features in Chime. And it is indeed general-purpose, though I have not tried that many languages yet, so I could end up running into one that cannot be described this way. So far, though, it's been great!

This pull request was closed.
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.

2 participants