Documentation
¶
Index ¶
- func BodyHash(node *sitter.Node, src []byte) string
- func CSharpLanguage() *sitter.Language
- func JavaLanguage() *sitter.Language
- func MaxDepth(node *sitter.Node, current int) int
- func NodeLines(node *sitter.Node) int
- func ParseSource(src []byte, lang *sitter.Language) (*sitter.Tree, error)
- func RunQuery(pattern string, root *sitter.Node, lang *sitter.Language) ([]*sitter.Node, error)
- func RustLanguage() *sitter.Language
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BodyHash ¶
BodyHash returns the SHA-256 hash (first 8 hex chars) of a function node's full source text (signature + body). Both the parse and llmc paths call this single function with the same node text, so their hashes always agree.
func CSharpLanguage ¶
CSharpLanguage returns the C# tree-sitter grammar handle.
func JavaLanguage ¶
JavaLanguage returns the Java tree-sitter grammar handle.
func MaxDepth ¶
MaxDepth returns the maximum "block" nesting depth under node. A child named "block" increments the running depth; all other named children are walked at the same depth. The deepest path wins.
func NodeLines ¶
NodeLines returns the number of source lines a node spans, inclusive of both its start and end rows.
func ParseSource ¶
ParseSource parses source bytes with the given tree-sitter grammar and returns the resulting syntax tree.
func RunQuery ¶
RunQuery executes an S-expression query against root using the given grammar and returns every captured node, in match order.
func RustLanguage ¶
RustLanguage returns the Rust tree-sitter grammar handle.
Types ¶
This section is empty.