Struct lib_ruby_parser::nodes::Begin [−][src]
#[repr(C)]pub struct Begin { pub statements: Vec<Node>, pub begin_l: Option<Loc>, pub end_l: Option<Loc>, pub expression_l: Loc, }
Expand description
Represents compound statement (i.e. a multi-statement)
Basically all blocks of code are wrapped into Begin
node (e.g. method/block body, rescue/ensure handler etc)
Fields
statements: Vec<Node>
A list of statements
begin_l: Option<Loc>
Begin of the block
(1; 2)
~
None
if the block of code is “implicit”, like
if true; 1; 2; end
end_l: Option<Loc>
End of the block
(1; 2)
~
None
if the block of code is “implicit”, like
if true; 1; 2; end
expression_l: Loc
Location of the full expression
(1; 2)
~~~~~~
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Begin
impl UnwindSafe for Begin
Blanket Implementations
Mutably borrows from an owned value. Read more