context

package
v0.0.0-...-ae3ab5d Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

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

Analyzer analyzes code context from Go source files

func NewAnalyzer

func NewAnalyzer() *Analyzer

NewAnalyzer creates a new context analyzer

func (*Analyzer) AnalyzeFile

func (a *Analyzer) AnalyzeFile(filePath string, contextLines int) (*FileContext, error)

AnalyzeFile analyzes a single Go source file

func (*Analyzer) AnalyzeSymbol

func (a *Analyzer) AnalyzeSymbol(filePath, symbolName string) (*SymbolContext, error)

AnalyzeSymbol analyzes a specific symbol in a file

func (*Analyzer) FindReferences

func (a *Analyzer) FindReferences(projectPath, symbolName string) ([]codeintel.ReferenceInfo, error)

FindReferences finds all references to a symbol across a project

type FileContext

type FileContext struct {
	FileInfo     codeintel.FileInfo         `json:"file_info"`
	Symbols      []codeintel.SymbolInfo     `json:"symbols"`
	Imports      []codeintel.ImportInfo     `json:"imports"`
	Dependencies []codeintel.DependencyInfo `json:"dependencies"`
	References   []codeintel.ReferenceInfo  `json:"references,omitempty"`
}

FileContext represents the context of a file

type SymbolContext

type SymbolContext struct {
	Symbol       codeintel.SymbolInfo       `json:"symbol"`
	Definition   codeintel.Location         `json:"definition"`
	References   []codeintel.ReferenceInfo  `json:"references"`
	Dependencies []codeintel.DependencyInfo `json:"dependencies"`
}

SymbolContext represents the context of a specific symbol

Jump to

Keyboard shortcuts

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