Help us shape the future of Go! Take the 2026 Go Developer Survey

treesitter

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package treesitter parses non-Go sources using tree-sitter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser parses non-Go sources using tree-sitter queries.

func NewParser

func NewParser() *Parser

NewParser constructs a tree-sitter parser.

func (*Parser) ExtractCalls

func (p *Parser) ExtractCalls(_ context.Context, _ string) ([]*graph.Edge, error)

ExtractCalls returns call edges for the given file when supported.

func (*Parser) ExtractControlFlow

func (p *Parser) ExtractControlFlow(_ context.Context, _ string) ([]*graph.Edge, error)

ExtractControlFlow returns control-flow edges for the given file when supported.

func (*Parser) ParseFile

func (p *Parser) ParseFile(_ context.Context, path string) ([]*graph.Node, []*graph.Edge, error)

ParseFile extracts symbol nodes and edges from a source file.

Directories

Path Synopsis
Package python provides tree-sitter queries for Python.
Package python provides tree-sitter queries for Python.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL