Skip to content

Passing an existing tree-sitter AST in? #490

Open
@bjchambers

Description

@bjchambers

If we've already parsed a tree-sitter AST from a source file using a given Language, is there a way to pass it in to create the stack graph without re-parsing it? Alternatively, is there a way to get the tree_sitter AST out of the Stack Graph?

I'd like to get all functions/types/etc. defined in a file, along with (a) any documentation comments associated with the definitions and (b) references within the implementations.

Ideally, the stack graphs would make it possible to navigate to documentation of the comments, but failing that, I can build a stack-graph separately and use it for resolving references within the implementation. However, I'd like to do so in a way that doesn't require re-parsing the AST, if possible. Any thoughts? Other approaches to consider?

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