Expand description
Language parsing using tree-sitter.
Structs§
- Function
Def - A function definition.
- Function
Ref - Borrowed view of a function indexed in a
SyntaxIndex. - Import
- An import statement.
- Import
Ref - Borrowed view of an import indexed in a
SyntaxIndex. - Parsed
File - A parsed file with its tree-sitter AST and Heddle-owned syntax index.
- Syntax
Index - Compact Heddle-owned syntax data for one parsed source file.
Enums§
- Import
Kind - Type of import.
- Language
- Supported programming languages.
Functions§
- extract_
dependencies - Extract dependencies from a parsed file.
- is_
comment_ node - Whether a tree-sitter node kind names a comment. Comment subtrees are
skipped wholesale by
walk_non_comment_leaves, so doc-comments and ordinary comments alike are excluded from semantic fingerprints. - walk_
non_ comment_ leaves - DFS in document order over
node’s subtree, invokingon_leaffor each non-comment leaf (a node with no children). Comment nodes — and their entire subtrees — are skipped.