Documentation
¶
Overview ¶
Package python implements a tree-sitter-based parser for Python source files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
Dependency represents an import statement.
type Entity ¶
type Entity struct {
Name string
Type string // "function" | "method" | "class"
Kind string // "function" | "async_function" | "method" | "async_method" | "class"
Signature string
StartLine int
EndLine int
Docs string
Parent string // name of enclosing class, empty for top-level
}
Entity represents a named code element (function, method, class).
type ParseResult ¶
type ParseResult struct {
FilePath string
Entities []*Entity
Dependencies []*Dependency
}
ParseResult is the output of Parse.
type PythonParser ¶
type PythonParser struct{}
PythonParser is the entry point for Python source files.
func (*PythonParser) Parse ¶
func (p *PythonParser) Parse(filePath string, content string) (*ParseResult, error)
Parse parses a Python source file using tree-sitter.
Click to show internal directories.
Click to hide internal directories.