Fix find-all-references
This commit is contained in:
parent
a215a2116a
commit
8b0d09c08d
@ -61,12 +61,16 @@ impl StaticAnalysis {
|
|||||||
let definition_id = self.state.find_definition(&symbol_id);
|
let definition_id = self.state.find_definition(&symbol_id);
|
||||||
references.push(definition_id);
|
references.push(definition_id);
|
||||||
|
|
||||||
for semantic_symbol in &self.state.symbol_table {
|
for (symbol_idx, semantic_symbol) in self.state.symbol_table.iter().enumerate() {
|
||||||
if let SemanticKind::Reference(idx) = semantic_symbol.kind {
|
if let SemanticKind::Reference(ref_idx) = semantic_symbol.kind {
|
||||||
references.push(idx);
|
if ref_idx == definition_id {
|
||||||
|
references.push(SymbolId(symbol_idx));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dbg!(&references);
|
||||||
|
|
||||||
Some(references)
|
Some(references)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user