/** * Docstring & declaration-signature extraction helpers — extracted from * `call-graph.ts` (change: modularize-call-graph-builder; analyzer: * StableCallGraphBarrel). * * Two pure string-scanning functions over source text + AST byte offsets, with no * dependency on the rest of the analyzer (no tree-sitter, no module state). They * were file-internal helpers in `call-graph.ts` (never on its public surface), so * they are exported here and imported back by the extractors — the public import * surface of `call-graph.ts` is unchanged. Moving them cannot alter graph output. */ /** * Scan backward from `startIndex` in `source` to find the doc comment * immediately preceding the function declaration. Skip blank lines. * * For Python, docstrings are INSIDE the function body — scan forward from * `startIndex` past the `def name(...):` colon to find the triple-quoted string. * * Returns the first meaningful (non-empty, non-decorator) line of the comment. */ export declare function extractDocstringBefore(source: string, startIndex: number, language: string): string | undefined; /** * Extract the function declaration (signature without body) from * `source.slice(startIndex, endIndex)`. * * Strategy: * - TS/JS/Java/C++/Go/Rust/Ruby: take everything up to the first `{` at depth 0 * - Python: take everything up to the first `:` that ends the `def` line * * Whitespace is normalized (multiple spaces/newlines → single space). * Limited to 300 characters max. */ export declare function extractDeclaration(source: string, startIndex: number, endIndex: number, language: string): string; //# sourceMappingURL=call-graph-extract.d.ts.map