/** * Universal regex symbol extractor. * * Used for: * - languages without a first-class AST parser (Java, C++, Ruby, …) * - fallback when a native toolchain is missing (Python without `python`, * Go without `go`, Rust without cargo/syn) * * Patterns are intentionally recall-oriented: better a few false positives * in the index than silently dropping whole packages from search/code-map. */ import type { FileSymbols, SymbolLang } from './schema.js'; /** Soft default: enough for normal sources without runaway regex on minified blobs. */ export declare const GENERIC_MAX_SYMBOLS_DEFAULT = 500; /** * Only the leading window is scanned — huge generated files stay cheap. * H-10 (security report VF-11): lowered from 512 KB. The fallback regex * extractor is a last resort (tree-sitter missing/failed), and a whitespace * bomb under the old window needed only ~500 bytes to stall the indexer for * seconds — the remaining risk scales with window size, so the window itself * is bounded well below real source-file sizes. */ export declare const GENERIC_MAX_FILE_CHARS: number; /** * Extract symbols with language-tuned regexes. Never throws. * Caps results so pathological files cannot explode the index. */ export declare function parseGeneric(opts: { file: string; content: string; lang: SymbolLang; /** Soft cap per file (default {@link GENERIC_MAX_SYMBOLS_DEFAULT}). */ maxSymbols?: number; }): FileSymbols; /** Async wrapper matching other parser entrypoints. */ export declare function parseSymbols(opts: { file: string; content: string; lang: SymbolLang; }): Promise; //# sourceMappingURL=generic-parser.d.ts.map