Are there any publicly available examples of what it actually looks like to implement this for a given language? Is that somewhere in the linked rust crate? It seems very cool but I'm having some trouble imagining what the actual implementation for a given language would look like. Thanks!
Unfortunately not yet — we have working stack rules for Python, but they use an older internal version of the graph DSL. We’re actively working on porting it to the open source tree-sitter-graph DSL and adding it to the public tree-sitter-python grammar repo. But it’s not there yet.
Re:Stack Graphs
by ZeroCool2u on Thursday December 09, 2021 @02:45PM
(#29501991)
Got it, that's really helpful in terms of estimating the work involved. Thanks for taking the time to answer all these questions and congrats again on the release!
We do have a couple of other languages in the pipeline that my team has been working on, both in terms of writing stack graph rules to get precise support, and also to write "fuzzy" tagging rules to get search-based support. And we definitely do plan to include lower level languages like the ones you mentioned.
Lastly, one major reason that we're doing all of this in open-source projects is that we want to ensure that language communities can self-serve support for their languages, should they wish to. That will be especially useful for the long tail of languages that my team will honestly never be able to get to ourselves. We have some work to do to get the documentation written to properly support self-serve stack graph rules, but it's definitely a goal that we're aiming for.