pub struct LuaDeclarationTree { /* private fields */ }Implementations§
Source§impl LuaDeclarationTree
impl LuaDeclarationTree
pub fn new(file_id: FileId) -> Self
pub fn file_id(&self) -> FileId
pub fn find_local_decl( &self, name: &str, position: TextSize, ) -> Option<&LuaDecl>
pub fn get_env_decls(&self, position: TextSize) -> Option<Vec<LuaDeclId>>
pub fn add_decl(&mut self, decl: LuaDecl) -> LuaDeclId
pub fn get_decl_mut(&mut self, decl_id: LuaDeclId) -> Option<&mut LuaDecl>
pub fn get_decl(&self, decl_id: &LuaDeclId) -> Option<&LuaDecl>
pub fn create_scope( &mut self, range: TextRange, kind: LuaScopeKind, ) -> LuaScopeId
pub fn add_decl_to_scope(&mut self, scope_id: LuaScopeId, decl_id: LuaDeclId)
pub fn add_child_scope(&mut self, parent_id: LuaScopeId, child_id: LuaScopeId)
pub fn find_self_decl( &self, db: &DbIndex, name_expr: LuaNameExpr, ) -> Option<LuaDeclOrMemberId>
pub fn get_root_scope(&self) -> Option<&LuaScope>
pub fn get_scope(&self, scope_id: &LuaScopeId) -> Option<&LuaScope>
pub fn get_decls(&self) -> &HashMap<LuaDeclId, LuaDecl>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LuaDeclarationTree
impl RefUnwindSafe for LuaDeclarationTree
impl Send for LuaDeclarationTree
impl Sync for LuaDeclarationTree
impl Unpin for LuaDeclarationTree
impl UnwindSafe for LuaDeclarationTree
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more