Expand description
Shared symbol extraction from source code.
This module provides the core AST traversal logic for extracting symbols, imports, and other facts from source files.
§Extraction paths
Symbol extraction uses the tags path: a *.tags.scm query is run against the
tree-sitter parse tree. The query groups @definition.* + @name captures per
match, reconstructs nesting by line-range containment, and returns a Vec<Symbol>.
After extraction, post-processing steps apply (Rust impl-block merging, TypeScript/JavaScript interface marking).
Structs§
- Extract
Options - Options for symbol extraction.
- Extract
Result - Result of extracting symbols from a file.
- Extractor
- Shared symbol extractor using the Language trait.
- OnDemand
Resolver - Resolver that parses files on-demand for cross-file interface lookups. This is the fallback when no index is available.
Traits§
- Interface
Resolver - Resolver for cross-file interface method lookups. Used to find interface/class method signatures from other files.
Functions§
- compute_
complexity - Compute cyclomatic complexity for a function node using the
.complexity.scmquery. Returns 1 (base complexity) for languages without a complexity query.