MCPcopy Create free account
hub / github.com/douglance/devsql / extract_symbols

Function extract_symbols

crates/devsql/src/providers/symbols.rs:459–467  ·  view source on GitHub ↗
(language: &str, content: &str)

Source from the content-addressed store, hash-verified

457}
458
459pub fn extract_symbols(language: &str, content: &str) -> Vec<SymbolMatch> {
460 match language {
461 "Rust" => extract_rust(content),
462 "TypeScript" | "TSX" | "JavaScript" | "JSX" => extract_ts_js(content),
463 "Python" => extract_python(content),
464 "Go" => extract_go(content),
465 _ => Vec::new(),
466 }
467}
468
469fn line_number_at(content: &str, byte_offset: usize) -> usize {
470 content[..byte_offset].matches('\n').count() + 1

Callers 2

diff_file_symbolsFunction · 0.85

Calls 4

extract_rustFunction · 0.85
extract_ts_jsFunction · 0.85
extract_pythonFunction · 0.85
extract_goFunction · 0.85

Tested by

no test coverage detected