Skip to content

Commit

Permalink
feat(semantic): add SymbolTable::add_resolved_reference method
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Dec 3, 2024
1 parent 40792b4 commit 617fc06
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/oxc_semantic/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ impl SymbolTable {
.map(|&reference_id| &self.references[reference_id])
}

/// Add a reference to a symbol.
pub fn add_resolved_reference(&mut self, symbol_id: SymbolId, reference_id: ReferenceId) {
let reference_ids = &mut self.resolved_references[symbol_id];
reference_ids.push(reference_id);
}

/// Delete a reference to a symbol.
///
/// # Panics
Expand Down

0 comments on commit 617fc06

Please sign in to comment.