#[repr(C)]pub struct pm_block_node {
pub base: pm_node_t,
pub locals: pm_constant_id_list_t,
pub parameters: *mut pm_node,
pub body: *mut pm_node,
pub opening_loc: pm_location_t,
pub closing_loc: pm_location_t,
}
Expand description
BlockNode
Represents a block of ruby code.
[1, 2, 3].each { |i| puts x }
^^^^^^^^^^^^^^
Type: ::PM_BLOCK_NODE
@extends pm_node_t
Fields§
§base: pm_node_t
The embedded base node.
locals: pm_constant_id_list_t
BlockNode#locals
The local variables declared in the block.
[1, 2, 3].each { |i| puts x } # locals: [:i]
^
parameters: *mut pm_node
BlockNode#parameters
The parameters of the block.
[1, 2, 3].each { |i| puts x }
^^^
[1, 2, 3].each { puts _1 }
^^^^^^^^^^^
[1, 2, 3].each { puts it }
^^^^^^^^^^^
body: *mut pm_node
BlockNode#body
The body of the block.
[1, 2, 3].each { |i| puts x }
^^^^^^
opening_loc: pm_location_t
BlockNode#opening_loc
Represents the location of the opening |
.
[1, 2, 3].each { |i| puts x }
^
closing_loc: pm_location_t
BlockNode#closing_loc
Represents the location of the closing |
.
[1, 2, 3].each { |i| puts x }
^
Trait Implementations§
Source§impl Clone for pm_block_node
impl Clone for pm_block_node
Source§fn clone(&self) -> pm_block_node
fn clone(&self) -> pm_block_node
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for pm_block_node
impl Debug for pm_block_node
Source§impl Default for pm_block_node
impl Default for pm_block_node
impl Copy for pm_block_node
Auto Trait Implementations§
impl Freeze for pm_block_node
impl RefUnwindSafe for pm_block_node
impl !Send for pm_block_node
impl !Sync for pm_block_node
impl Unpin for pm_block_node
impl UnwindSafe for pm_block_node
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