Documentation
¶
Index ¶
- Constants
- func QueryErrorTypeToString(errorType uint32) string
- type IterMode
- type Iterator
- type Language
- type LanguageError
- type Node
- func (n Node) Child(ctx context.Context, index uint64) (Node, error)
- func (n Node) ChildCount(ctx context.Context) (uint64, error)
- func (n Node) EndByte(ctx context.Context) (uint64, error)
- func (n Node) IsError(ctx context.Context) (bool, error)
- func (n Node) Kind(ctx context.Context) (string, error)
- func (n Node) NamedChild(ctx context.Context, index uint64) (Node, error)
- func (n Node) NamedChildCount(ctx context.Context) (uint64, error)
- func (n Node) StartByte(ctx context.Context) (uint64, error)
- func (n Node) String(ctx context.Context) (string, error)
- type Parser
- type Query
- type QueryCapture
- type QueryCursor
- type QueryMatch
- type Tree
- type Treesitter
- func (t Treesitter) LanguageSQL(ctx context.Context) (Language, error)
- func (t Treesitter) NewIterator(n Node, mode IterMode) Iterator
- func (t Treesitter) NewParser(ctx context.Context) (Parser, error)
- func (t Treesitter) NewQuery(ctx context.Context, pattern string, l Language) (Query, error)
- func (t Treesitter) NewQueryCursor(ctx context.Context) (QueryCursor, error)
Constants ¶
View Source
const ( QueryErrorNone uint32 = iota QueryErrorSyntax QueryErrorNodeType QueryErrorField QueryErrorCapture QueryErrorStructure QueryErrorLanguage )
Variables ¶
This section is empty.
Functions ¶
func QueryErrorTypeToString ¶
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func NewNamedIterator ¶
type Language ¶
type Language struct {
// contains filtered or unexported fields
}
func NewLanguage ¶
func NewLanguage(l uint64, t Treesitter) Language
type LanguageError ¶
type LanguageError struct {
// contains filtered or unexported fields
}
func (LanguageError) Error ¶
func (l LanguageError) Error() string
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (Parser) GetLanguageVersion ¶
func (Parser) ParseString ¶
type QueryCapture ¶
type QueryCursor ¶
type QueryCursor struct {
// contains filtered or unexported fields
}
func (QueryCursor) NextMatch ¶
func (qc QueryCursor) NextMatch(ctx context.Context) (QueryMatch, bool, error)
type QueryMatch ¶
type QueryMatch struct { ID uint32 PatternIndex uint16 Captures []QueryCapture }
type Treesitter ¶
type Treesitter struct {
// contains filtered or unexported fields
}
func (Treesitter) LanguageSQL ¶
func (t Treesitter) LanguageSQL(ctx context.Context) (Language, error)
func (Treesitter) NewIterator ¶
func (t Treesitter) NewIterator(n Node, mode IterMode) Iterator
func (Treesitter) NewQueryCursor ¶
func (t Treesitter) NewQueryCursor(ctx context.Context) (QueryCursor, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.