Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LanguageFor ¶
func LanguageFor(file string) (*treesitter.Language, bool)
LanguageFor returns the language for the given file name.
func RegisterLanguage ¶ added in v0.0.7
func RegisterLanguage(lang *treesitter.Language, extensions ...string)
RegisterLanguage registers a language with the given extensions.
Types ¶
type Todo ¶
Todo represents a TODO line.
func ParseCode ¶
func ParseCode(ctx context.Context, file string, source []byte, lang *treesitter.Language) ([]Todo, error)
ParseCode parses the source code and returns all TODO comments. If lang is nil, the language is inferred from the file extension.
Click to show internal directories.
Click to hide internal directories.