Module extract

Module extract 

Source
Expand description

Trace Extract Module

Unified extraction interface for parsing source files and extracting symbols, calls, references, scopes, and tokens using tree-sitter (primary) with regex fallback for unsupported languages.

@module trace/extract

Modules§

regex
Regex-Based Extraction Fallback
treesitter
Tree-sitter Based Extraction

Structs§

ExtractedCall
A function/method call extracted from source code
ExtractedData
Complete extraction results from a source file
ExtractedRef
A reference to a symbol (variable read/write, type annotation, import)
ExtractedScope
A scope in the AST hierarchy
ExtractedSymbol
A symbol definition extracted from source code
ExtractedToken
A token (identifier) extracted from source code

Enums§

ExtractError
Errors that can occur during extraction
ExtractionMethod
Method used for extraction
RefKind
Kind of reference extracted from source code
ScopeKind
Kind of scope in the AST
SymbolKind
Kind of symbol extracted from source code
TokenKind
Kind of token extracted

Functions§

detect_language
Detect language from file path extension
extract_file
Extract symbols, calls, references, scopes, and tokens from a source file.
is_treesitter_supported
Check if language is supported by tree-sitter