struct Builder<'ast> {
symbols: Vec<Symbol>,
occurrences: Vec<Occurrence>,
scopes: Vec<HashMap<&'ast str, SymbolId>>,
blocks: Vec<Span>,
}Fields§
§symbols: Vec<Symbol>§occurrences: Vec<Occurrence>§scopes: Vec<HashMap<&'ast str, SymbolId>>Innermost last. The first scope holds the top-level declarations.
blocks: Vec<Span>The blocks enclosing the statement being resolved, innermost last.
Implementations§
Source§impl<'ast> Builder<'ast>
impl<'ast> Builder<'ast>
fn declare_item(&mut self, item: &'ast Item) -> Declared
fn declare_callable( &mut self, name: &'ast Ident, kind: SymbolKind, params: &[TypedName], body: &Block, ) -> Declared
fn resolve_item(&mut self, item: &'ast Item, declared: &Declared)
fn resolve_callable_body( &mut self, params: &'ast [TypedName], ids: &[SymbolId], body: &'ast Block, )
fn resolve_block(&mut self, block: &'ast Block)
fn resolve_stmt(&mut self, stmt: &'ast StmtKind)
fn resolve_if(&mut self, if_stmt: &'ast IfStmt)
fn resolve_expr(&mut self, expr: &'ast Expr)
Sourcefn resolve_callee(&mut self, callee: &'ast Expr) -> Option<SymbolId>
fn resolve_callee(&mut self, callee: &'ast Expr) -> Option<SymbolId>
Resolves what is being called, returning its symbol when it is declared in the file.
Sourcefn resolve_args(&mut self, callee: Option<SymbolId>, args: &'ast [Arg])
fn resolve_args(&mut self, callee: Option<SymbolId>, args: &'ast [Arg])
Argument labels of a call to a declared struct, function or view refer to its fields or parameters.
fn resolve_name( &mut self, name: &str, span: Span, name_use: NameUse, ) -> Option<SymbolId>
fn resolve_type_annotation(&mut self, ty: Option<&TypeExpr>)
fn resolve_type(&mut self, ty: &TypeExpr)
fn lookup(&self, name: &str) -> Option<SymbolId>
fn member(&self, parent: SymbolId, name: &str) -> Option<SymbolId>
Sourcefn declare_global(&mut self, name: &'ast Ident, kind: SymbolKind) -> SymbolId
fn declare_global(&mut self, name: &'ast Ident, kind: SymbolKind) -> SymbolId
Declares a top-level name. When a name is declared twice, the first one wins.
fn declare( &mut self, name: &Ident, kind: SymbolKind, parent: Option<SymbolId>, visibility: Visibility, ) -> SymbolId
fn bind(&mut self, name: &'ast str, id: SymbolId)
fn unresolved(&mut self, span: Span, kind: Unresolved)
fn occur(&mut self, span: Span, role: Role)
Auto Trait Implementations§
impl<'ast> Freeze for Builder<'ast>
impl<'ast> RefUnwindSafe for Builder<'ast>
impl<'ast> Send for Builder<'ast>
impl<'ast> Sync for Builder<'ast>
impl<'ast> Unpin for Builder<'ast>
impl<'ast> UnsafeUnpin for Builder<'ast>
impl<'ast> UnwindSafe for Builder<'ast>
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