Struct lib_ruby_parser::nodes::Procarg0 [−][src]
Represents a sole block argument (e.g. |foo|
)
Block that takes a single array argument automatically expands it.
Adding trailing comma after block argument disables this behavior (and then the only argument is emitted as Arg
).
Fields
args: List<Node>
Parts of the sole block argument.
proc { |(a, b)| }
also counts as a sole argument, so this list may contain:
1. A single Arg
node (for proc { |a| }
case)
2. Multiple Arg
nodes (for proc { |(a, b, c)| }
case)
begin_l: MaybeLocPtr
Location of the open parenthesis
proc { |(foo, bar)| }
~
None
if there’s only one argument
end_l: MaybeLocPtr
Location of the open parenthesis
proc { |(foo, bar)| }
~
None
if there’s only one argument
expression_l: LocPtr
Location of the full expression
proc { |(foo, bar)| }
~~~~~~~~~~
Trait Implementations
impl Clone for Procarg0
[src][+]
impl Debug for Procarg0
[src][+]
impl PartialEq<Procarg0> for Procarg0
[src][+]
impl StructuralPartialEq for Procarg0
[src]
Auto Trait Implementations
impl RefUnwindSafe for Procarg0
impl Send for Procarg0
impl Sync for Procarg0
impl Unpin for Procarg0
impl UnwindSafe for Procarg0
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,