Struct lib_ruby_parser::nodes::Block [−][src]
#[repr(C)]pub struct Block { pub call: Box<Node>, pub args: Option<Box<Node>>, pub body: Option<Box<Node>>, pub begin_l: Loc, pub end_l: Loc, pub expression_l: Loc, }
Expand description
Represents a Ruby block that is passed to a method (proc { |foo| bar })
Fields
call: Box<Node>Method call that takes a block
Send("foo") in foo {}
args: Option<Box<Node>>A list of argument that block takes
vec![ Arg("a"), Optarg("b", Int("1")) ] for proc { |a, b = 1| }
None if the block takes no arguments
body: Option<Box<Node>>Block body, None if block has no body.
begin_l: LocLocation of the open brace
proc { }
~
end_l: LocLocation of the closing brace
proc { }
~
expression_l: LocLocation of the full expression
proc { }
~~~~~~~~
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Blockimpl UnwindSafe for BlockBlanket Implementations
Mutably borrows from an owned value. Read more