mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
refactor(semantic)!: remove SymbolTable::get_symbol_id_from_name and SymbolTable::get_scope_id_from_name (#5480)
Close #5456.
This commit is contained in:
parent
7414190ada
commit
bd820f9c16
1 changed files with 0 additions and 14 deletions
|
|
@ -71,16 +71,6 @@ impl SymbolTable {
|
|||
.find_map(|(symbol, &inner_span)| if inner_span == span { Some(symbol) } else { None })
|
||||
}
|
||||
|
||||
pub fn get_symbol_id_from_name(&self, name: &str) -> Option<SymbolId> {
|
||||
self.names.iter_enumerated().find_map(|(symbol, inner_name)| {
|
||||
if inner_name.as_str() == name {
|
||||
Some(symbol)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_span(&self, symbol_id: SymbolId) -> Span {
|
||||
self.spans[symbol_id]
|
||||
|
|
@ -135,10 +125,6 @@ impl SymbolTable {
|
|||
self.get_symbol_id_from_span(span).map(|symbol_id| self.get_scope_id(symbol_id))
|
||||
}
|
||||
|
||||
pub fn get_scope_id_from_name(&self, name: &str) -> Option<ScopeId> {
|
||||
self.get_symbol_id_from_name(name).map(|symbol_id| self.get_scope_id(symbol_id))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_declaration(&self, symbol_id: SymbolId) -> AstNodeId {
|
||||
self.declarations[symbol_id]
|
||||
|
|
|
|||
Loading…
Reference in a new issue