pub struct Binder { /* private fields */ }Implementations§
Source§impl Binder
impl Binder
pub fn current_scope_id(&self) -> ScopeId
pub fn get_function( &self, function_id: FunctionId, ) -> &SpannedItem<FunctionDeclaration>
pub fn get_type(&self, type_id: TypeId) -> &TypeDeclaration
Sourcepub fn find_symbol_in_scope(
&self,
name: SymbolId,
scope_id: ScopeId,
) -> Option<&Item>
pub fn find_symbol_in_scope( &self, name: SymbolId, scope_id: ScopeId, ) -> Option<&Item>
Searches for a symbol in a scope or any of its parents
Sourcepub fn find_spanned_symbol_in_scope(
&self,
name: SymbolId,
scope_id: ScopeId,
) -> Option<&SpannedItem<Item>>
pub fn find_spanned_symbol_in_scope( &self, name: SymbolId, scope_id: ScopeId, ) -> Option<&SpannedItem<Item>>
Searches for a symbol in a scope or any of its parents
Sourcepub fn scope_iter(
&self,
) -> impl Iterator<Item = (ScopeId, &Scope<SpannedItem<Item>>)>
pub fn scope_iter( &self, ) -> impl Iterator<Item = (ScopeId, &Scope<SpannedItem<Item>>)>
Iterate over all scopes in the binder.
pub fn insert_into_current_scope( &mut self, name: SymbolId, item: SpannedItem<Item>, )
pub fn get_scope(&self, scope: ScopeId) -> &Scope<SpannedItem<Item>>
pub fn get_scope_kind(&self, scope: ScopeId) -> ScopeKind
pub fn with_scope<F, R>(&mut self, kind: ScopeKind, f: F) -> R
pub fn from_ast(ast: &Ast) -> Self
pub fn from_ast_and_deps( ast: &Ast, dependencies: Vec<Dependency>, interner: &mut SymbolInterner, ) -> Self
pub fn insert_into_specified_scope( &mut self, scope: ScopeId, name: Identifier, item: Item, )
pub fn get_module(&self, id: ModuleId) -> &Module
pub fn get_binding(&self, binding_id: BindingId) -> &Binding
pub fn create_scope(&mut self, kind: ScopeKind) -> ScopeId
pub fn iter_scope( &self, scope: ScopeId, ) -> impl Iterator<Item = (&SymbolId, &SpannedItem<Item>)>
pub fn insert_expression(&mut self, id: ExprId, scope: ScopeId)
pub fn get_expr_scope(&self, id: ExprId) -> Option<ScopeId>
Auto Trait Implementations§
impl !Send for Binder
impl !Sync for Binder
impl Freeze for Binder
impl RefUnwindSafe for Binder
impl Unpin for Binder
impl UnsafeUnpin for Binder
impl UnwindSafe for Binder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more