/** * Rust source symbol extraction. * * Extracts fn, struct, enum, trait, impl, type, const, static and mod with * line-anchored regexes. Dependency edges do not come from here — `use` and * `mod` declarations are read by `import-extractor.ts` and resolved against the * crate's `Cargo.toml` by `module-resolver.ts`. * * ### Why there is no native `syn` parser * * There used to be a path that shelled out to a cargo subproject for real AST * parsing. It resolved that subproject relative to `process.cwd()` — the * *indexed project*, not the wstack installation — and the crate has never * existed in this repository. So the branch was unreachable except in the one * case where it must never fire: an indexed repository that happens to contain * `tools/Cargo.toml`, where indexing would have run `cargo run` inside the * user's checkout and written to `tools/syn-parser/src/input.rs`. * * Indexing reads a repository; it does not execute its build or write to its * working tree. Reinstating native parsing means shipping the crate inside the * wstack installation and resolving it from there — never from the scan target. */ import type { FileSymbols, SymbolLang } from './schema.js'; export declare function parseSymbols(opts: { file: string; content: string; lang: SymbolLang; }): Promise; export { detectLang } from './languages.js'; /** * Replace comments and string/char literal contents with spaces, keeping every * offset and newline intact so match positions map straight back to the * original source. Quote characters survive, so the lifetime guard * (`'static`) still sees its apostrophe. */ export declare function maskRustNonCode(src: string): string; //# sourceMappingURL=rs-parser.d.ts.map