Struct ruby_prism_sys::pm_scope
source · #[repr(C)]pub struct pm_scope {
pub locals: pm_constant_id_list_t,
pub previous: *mut pm_scope,
pub closed: bool,
pub explicit_params: bool,
pub numbered_parameters: u8,
}Expand description
This struct represents a node in a linked list of scopes. Some scopes can see into their parent scopes, while others cannot.
Fields§
§locals: pm_constant_id_list_tThe IDs of the locals in the given scope.
previous: *mut pm_scopeA pointer to the previous scope in the linked list.
closed: boolA boolean indicating whether or not this scope can see into its parent. If closed is true, then the scope cannot see into its parent.
explicit_params: boolA boolean indicating whether or not this scope has explicit parameters. This is necessary to determine whether or not numbered parameters are allowed.
numbered_parameters: u8An integer indicating the number of numbered parameters on this scope. This is necessary to determine if child blocks are allowed to use numbered parameters, and to pass information to consumers of the AST about how many numbered parameters exist.
Trait Implementations§
impl Copy for pm_scope
Auto Trait Implementations§
impl RefUnwindSafe for pm_scope
impl !Send for pm_scope
impl !Sync for pm_scope
impl Unpin for pm_scope
impl UnwindSafe for pm_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