Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

What languages are supported? #420

Description

@shobrook

Hi,

Just need some clarification. The tree-sitter-stack-graphs crate appears to only support four languages. The stack-graphs crate claims to work for any arbitrary programming language. I'm wondering, if I want to use this with more languages, what do I need to do? Which crate should I use? If I use the tree-sitter crate, do I need to supply a grammar for that language? What about the stack-graphs crate?

Thank you!

Activity

  1. hendrikvanantwerpen commented on Apr 12, 2024

    @hendrikvanantwerpen
    Contributor

    Thanks for the question. The setup for stack graphs is indeed similar to tree sitter. While tree-sitter is not specific to a language, a grammar is needed to support any particular language. Similarly, stack-graphs and tree-sitter-stack-graphs are not specific to any language, but a set of rules is needed to be able to generate stack graphs for any particular language. For tree-sitter-stack-graphs, these rules are written in TSG (e.g., for TypeScript) and we have done that for four languages so far. To support other languages, someone has to write such a TSG file for that particular language. (Since tree-sitter-stack-graphs is using tree-sitter, this assumes a tree-sitter grammar already exists.)

  2. arybitskiy commented on Jun 27, 2024

    @arybitskiy

    Hi
    In Typescript stack-graphs.tsg i see rules support tsx too.
    But when i try to index tsx file it does nothing.
    When i try to parse like tree-sitter-stack-graphs-typescript parse Dropdown.tsx, i'm getting Error: No stack graph language found
    Please help me.

    Thank you!

  3. rbatra5 commented on Oct 2, 2024

    @rbatra5

    Hello,
    Has anyone enabled stackgraph for C programs? or is any one working and need collaboration. I can chime in.
    please advise.
    Thank you

  4. feifanzhou commented on Dec 10, 2024

    @feifanzhou

    @hendrikvanantwerpen is the TSG for Typescript written by hand, or can it be generated from the typescript grammar (and if so, how)?

  5. dcreager commented on Dec 11, 2024

    @dcreager
    Contributor

    @hendrikvanantwerpen is the TSG for Typescript written by hand, or can it be generated from the typescript grammar (and if so, how)?

    It was written by hand (heroically) by @hendrikvanantwerpen

  6. drestrepom commented on Jun 27, 2025

    @drestrepom

    @hendrikvanantwerpen How can I start writing a TSG grammar? I want to create a grammar for C#, just to practice and understand this large project. I look at existing grammars and it seems overwhelming. I don't know where to start to understand the code.

    • Should I start writing my grammar in the same order you wrote the TypeScript one?
    • Do you have any debugging techniques to test that your grammar is working, something more visual?
    • Any cookbooks?
  7. CleanCut commented on Sep 9, 2025

    @CleanCut

    The github/stack-graphs repository is no longer being maintained. As per #502, I'm closing all issues and pull requests before archiving the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions