Struct lib_ruby_parser::nodes::Procarg0 [−][src]
#[repr(C)]pub struct Procarg0 {
pub args: Vec<Node>,
pub begin_l: Option<Loc>,
pub end_l: Option<Loc>,
pub expression_l: Loc,
}Expand description
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: Vec<Node>Parts of the sole block argument.
proc { |(a, b)| } also counts as a sole argument, so this list may contain:
- A single
Argnode (forproc { |a| }case) - Multiple
Argnodes (forproc { |(a, b, c)| }case)
begin_l: Option<Loc>Location of the open parenthesis
proc { |(foo, bar)| }
~None if there’s only one argument
end_l: Option<Loc>Location of the open parenthesis
proc { |(foo, bar)| }
~None if there’s only one argument
expression_l: LocLocation of the full expression
proc { |(foo, bar)| }
~~~~~~~~~~Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Procarg0
impl UnwindSafe for Procarg0
Blanket Implementations
Mutably borrows from an owned value. Read more