(
language: &str,
content: &str,
file_path: &str,
label: &str,
next_id: &mut i64,
)
| 417 | } |
| 418 | |
| 419 | fn extract_symbols_with_regex( |
| 420 | language: &str, |
| 421 | content: &str, |
| 422 | file_path: &str, |
| 423 | label: &str, |
| 424 | next_id: &mut i64, |
| 425 | ) -> Vec<SymbolRow> { |
| 426 | let matches = extract_symbols(language, content); |
| 427 | matches |
| 428 | .into_iter() |
| 429 | .map(|m| { |
| 430 | let id = *next_id; |
| 431 | *next_id += 1; |
| 432 | SymbolRow { |
| 433 | id, |
| 434 | file_path: file_path.to_string(), |
| 435 | name: m.name, |
| 436 | kind: m.kind, |
| 437 | line_start: m.line_start as i64, |
| 438 | line_end: m.line_end as i64, |
| 439 | signature: m.signature, |
| 440 | visibility: m.visibility, |
| 441 | parent_id: None, |
| 442 | parameters: String::new(), |
| 443 | return_type: String::new(), |
| 444 | language: label.to_string(), |
| 445 | } |
| 446 | }) |
| 447 | .collect() |
| 448 | } |
| 449 | |
| 450 | pub struct SymbolMatch { |
| 451 | pub name: String, |
no test coverage detected