Documentation
¶
Index ¶
- Variables
- type ASTCache
- type CachedAST
- type LanguageConfig
- type Provider
- func (p *Provider) Extensions() []string
- func (p *Provider) Language() string
- func (p *Provider) Query(source string, query core.AgentQuery) core.QueryResult
- func (p *Provider) Transform(source string, op core.TransformOp) core.TransformResult
- func (p *Provider) Validate(source string) providers.ValidationResult
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalCache = &ASTCache{ maxAge: 5 * time.Minute, }
GlobalCache is the singleton cache instance shared across all providers
Functions ¶
This section is empty.
Types ¶
type ASTCache ¶
type ASTCache struct {
// contains filtered or unexported fields
}
ASTCache is a lock-free cache for parsed ASTs (shared across all providers)
func (*ASTCache) GetOrParse ¶
GetOrParse returns cached AST or parses new one
type CachedAST ¶
type CachedAST struct {
// contains filtered or unexported fields
}
CachedAST holds parsed tree with metadata
type LanguageConfig ¶
type LanguageConfig interface {
// Metadata
Language() string
Extensions() []string
GetLanguage() *sitter.Language
// Language-specific AST mapping
MapQueryTypeToNodeTypes(queryType string) []string
ExtractNodeName(node *sitter.Node, source string) string
IsExported(name string) bool // For confidence calculation
}
LanguageConfig defines language-specific behavior that must be implemented
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider provides common functionality for all language providers
func New ¶
func New(config LanguageConfig) *Provider
New creates a base provider with language-specific config
func (*Provider) Extensions ¶
Extensions returns supported file extensions
func (*Provider) Query ¶
func (p *Provider) Query(source string, query core.AgentQuery) core.QueryResult
Query finds code elements matching the query
func (*Provider) Transform ¶
func (p *Provider) Transform(source string, op core.TransformOp) core.TransformResult
Transform applies a transformation operation
Click to show internal directories.
Click to hide internal directories.