Discover Packages
github.com/livecodelife/linespec/v3
pkg
discover
treesitter
package
Version:
v3.16.0
Opens a new window with list of versions in this module.
Published: Jul 20, 2026
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Engine parses a source file once and allows repeated query execution against it.
New parses src using the given language and returns an Engine ready for queries.
The parse is done once here; subsequent Query calls reuse the tree.
Query compiles pattern and executes it against the parsed tree, returning all
matches with named captures resolved to their text content.
Predicate filters (#match?, #eq?, etc.) declared in the pattern are applied.
Lang identifies a source language for parsing.
const (
LangGo Lang = iota
LangRuby
LangPython
LangJavaScript
)
ParseLang converts a string like "go" or "ruby" to a Lang constant.
Match is one tree-sitter query match with its named text captures.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.