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

parser

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectLanguage added in v0.2.0

func DetectLanguage(filePath string) string

DetectLanguage returns the canonical language identifier for a file path based on extension.

Types

type ContainsRel

type ContainsRel struct {
	ParentID   string // Can be File path or Class ID
	ChildID    string
	ParentType string // "File" or "Class"
	ChildType  string // "Function", "Class", "Variable"
}

type ImplementsRel

type ImplementsRel struct {
	FromClassID string
	ToClassName string // Name of interface/class it extends/implements
}

type ImportDecl added in v0.2.0

type ImportDecl struct {
	SourcePath string
	Path       string
}

type ParsedResult

type ParsedResult struct {
	FilePath   string
	Functions  []db.FunctionEntity
	Classes    []db.ClassEntity
	Variables  []db.VariableEntity
	Contains   []ContainsRel
	Implements []ImplementsRel
	Imports    []ImportDecl
}

func ParseContent added in v0.2.0

func ParseContent(content []byte, ext string, filePath string) (*ParsedResult, error)

func ParseFile

func ParseFile(filePath string) (*ParsedResult, error)

ParseFile parses a source file using Tree-sitter and returns extracted entities.

Jump to

Keyboard shortcuts

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