Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPluginNotFound = errors.New("language plugin not found")
ErrPluginNotFound is returned when a plugin is not found
Functions ¶
This section is empty.
Types ¶
type ParserRegistry ¶
type ParserRegistry interface {
RegisterParser(plugin schema.ParserPlugin) error
GetParser(language string) (schema.ParserPlugin, error)
GetParserForFile(path string, info fs.FileInfo) (schema.ParserPlugin, error)
GetParserForExtension(ext string) (schema.ParserPlugin, error)
GetAllParsers() []schema.ParserPlugin
}
ParserRegistry tracks registered language plugins
func NewRegistry ¶
func NewRegistry(logger *slog.Logger) ParserRegistry
NewRegistry creates a new language plugin registry
func RegisterLanguagePlugins ¶
func RegisterLanguagePlugins(logger *slog.Logger) (ParserRegistry, error)
RegisterLanguagePlugins initializes and populates a language registry
Click to show internal directories.
Click to hide internal directories.