pm_array_node_t

Type Alias pm_array_node_t 

Source
pub type pm_array_node_t = pm_array_node;
Expand description

ArrayNode

Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i.

 [1, 2, 3]
 ^^^^^^^^^

Type: ::PM_ARRAY_NODE

Flags (#pm_array_node_flags):

  • ::PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT

@extends pm_node_t

Aliased Type§

#[repr(C)]
pub struct pm_array_node_t { pub base: pm_node, pub elements: pm_node_list, pub opening_loc: pm_location_t, pub closing_loc: pm_location_t, }

Fields§

§base: pm_node

The embedded base node.

§elements: pm_node_list

ArrayNode#elements

Represent the list of zero or more non-void expressions within the array.

§opening_loc: pm_location_t

ArrayNode#opening_loc

Represents the optional source location for the opening token.

 [1,2,3]                 # "["
 %w[foo bar baz]         # "%w["
 %I(apple orange banana) # "%I("
 foo = 1, 2, 3           # nil
§closing_loc: pm_location_t

ArrayNode#closing_loc

Represents the optional source location for the closing token.

 [1,2,3]                 # "]"
 %w[foo bar baz]         # "]"
 %I(apple orange banana) # ")"
 foo = 1, 2, 3           # nil