Documentation
¶
Overview ¶
Package parser provides language-specific parsing capabilities
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileOutline ¶
type FileOutline struct {
Filename string // Name of the parsed file
Symbols []*Symbol // Top-level symbols in the file
Errors []error // Any errors encountered during parsing
}
FileOutline represents the parsed structure of a source file
type GoParser ¶
type GoParser struct{}
GoParser implements Parser for Go source files
func (*GoParser) Extensions ¶
type Parser ¶
type Parser interface {
// Parse analyzes the content of a file and returns a structured outline
Parse(content []byte, filename string) (*FileOutline, error)
// Extensions returns the file extensions this parser handles
Extensions() []string
}
Parser defines the interface for language-specific parsers
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages the available parsers
func (*Registry) IsSupported ¶
IsSupported checks if there's a parser available for the given file extension
type Symbol ¶
type Symbol struct {
Type string // e.g., "function", "class", "interface", etc.
Name string // Name of the symbol
Signature string // Full signature for functions/methods
Docstring string // Associated documentation
Decorators []string // Any decorators/annotations
Children []*Symbol // Nested symbols (e.g., methods in a class)
Metadata map[string]any // Additional language-specific metadata
}
Symbol represents a parsed symbol (function, type, class, etc.)
Click to show internal directories.
Click to hide internal directories.