pm_block_node_t

Type Alias pm_block_node_t 

Source
pub type pm_block_node_t = pm_block_node;
Expand description

BlockNode

Represents a block of ruby code.

 [1, 2, 3].each { |i| puts x }
                ^^^^^^^^^^^^^^

Type: ::PM_BLOCK_NODE

@extends pm_node_t

Aliased Type§

#[repr(C)]
pub struct pm_block_node_t { pub base: pm_node, 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, }

Fields§

§base: pm_node

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 }
                    ^