Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtractPattern ¶
type ExtractPattern struct {
Type string // Type of pattern (function_call, error_handling, import, etc.)
Template string // Abstracted template with placeholders
Variables map[string]string // Extracted variables and their types
Metadata map[string]interface{} // Additional metadata
Confidence float64 // Confidence score for the pattern
}
ExtractPattern represents an extracted code pattern
type ParsedCode ¶
ParsedCode represents a parsed code snippet with its abstract syntax tree
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser provides Tree-sitter based code parsing capabilities
func (*Parser) DetectLanguage ¶
DetectLanguage attempts to detect the programming language from code content
func (*Parser) ExtractPatterns ¶
func (p *Parser) ExtractPatterns(parsed *ParsedCode) ([]ExtractPattern, error)
ExtractPatterns extracts generalizable patterns from parsed code
Click to show internal directories.
Click to hide internal directories.