Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ComponentResolutionFunc ¶
func GetComponentResolutionFromTemplate ¶
func GetComponentResolutionFromTemplate(template *LanguagePackTemplate) ComponentResolutionFunc
type LanguagePack ¶
type LanguagePack struct {
FileGlob glob.Glob
Language *sitter.Language
Queries []*sitter.Query
ComponentResolution ComponentResolutionFunc
SnippetTransformers map[string]func(*file.Snippet) *file.Snippet
}
func PackFromTemplate ¶
func PackFromTemplate(template *LanguagePackTemplate) (*LanguagePack, error)
func (*LanguagePack) AnalyzeFile ¶
func (lp *LanguagePack) AnalyzeFile(f file.File) *file.Results
AnalyzeFile analyzes a file and returns the results. Snippets (which are just tree-sitter capture groups) starting with an underscore are only used for stats, and are not recorded as snippets.
func (*LanguagePack) AnalyzeFileContent ¶
func (lp *LanguagePack) AnalyzeFileContent(path string, content []byte) *file.Results
Click to show internal directories.
Click to hide internal directories.