pub struct Scope {
pub used_decls: HashSet<Declaration>,
/* private fields */
}
Fields§
§used_decls: HashSet<Declaration>
Implementations§
Source§impl Scope
impl Scope
pub fn new() -> Self
pub fn derive_scope(parent_scope: &Scope) -> CompilerResult<Self>
pub fn get_unused_register(&mut self) -> CompilerResult<Register>
pub fn get_unused_register_back(&mut self) -> CompilerResult<Register>
pub fn try_reserve_specific_reg( &mut self, specific_reg: Register, ) -> CompilerResult<Register>
pub fn add_decl( &mut self, decl_name: String, decl_type: DeclarationType, ) -> CompilerResult<Register>
pub fn get_decl(&mut self, decl_name: &str) -> CompilerResult<&Declaration>
pub fn reserve_register(&mut self) -> CompilerResult<Register>
pub fn reserve_register_back(&mut self) -> CompilerResult<Register>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnwindSafe for Scope
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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