Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions crates/mother-cli/src/commands/scan/phase3/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ async fn process_symbol_references(
}

/// Build a lookup table from file path to symbols in that file
fn build_symbol_lookup_table(symbols: &[SymbolInfo]) -> HashMap<String, Vec<(String, u32, u32)>> {
pub(crate) fn build_symbol_lookup_table(
symbols: &[SymbolInfo],
) -> HashMap<String, Vec<(String, u32, u32)>> {
let mut symbols_by_file: HashMap<String, Vec<(String, u32, u32)>> = HashMap::new();

for sym in symbols {
Expand Down Expand Up @@ -121,7 +123,7 @@ async fn create_reference_edges(
}

/// Find the symbol that contains a reference location
fn find_containing_symbol(
pub(crate) fn find_containing_symbol(
reference: &mother_core::lsp::LspReference,
symbols_by_file: &HashMap<String, Vec<(String, u32, u32)>>,
) -> Option<String> {
Expand Down
1 change: 1 addition & 0 deletions crates/mother-cli/src/commands/scan/phase3/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ mod tests_find_containing_symbol;
mod tests_process_symbol_references;
mod tests_reference_edge_logic;
mod tests_reference_mapping;
mod tests_run;
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! Tests for build_symbol_lookup_table function

use super::super::{build_symbol_lookup_table, SymbolInfo};
use super::super::build_symbol_lookup_table;
use crate::commands::scan::SymbolInfo;
use mother_core::scanner::Language;

#[test]
Expand Down
Loading