#[repr(C)]pub struct pm_array_node {
pub base: pm_node_t,
pub elements: pm_node_list,
pub opening_loc: pm_location_t,
pub closing_loc: pm_location_t,
}
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
Fields§
§base: pm_node_t
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
Trait Implementations§
Source§impl Clone for pm_array_node
impl Clone for pm_array_node
Source§fn clone(&self) -> pm_array_node
fn clone(&self) -> pm_array_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_array_node
impl Debug for pm_array_node
Source§impl Default for pm_array_node
impl Default for pm_array_node
impl Copy for pm_array_node
Auto Trait Implementations§
impl Freeze for pm_array_node
impl RefUnwindSafe for pm_array_node
impl !Send for pm_array_node
impl !Sync for pm_array_node
impl Unpin for pm_array_node
impl UnwindSafe for pm_array_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