Struct lib_ruby_parser::nodes::Begin
source · #[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§
source§impl PartialEq for Begin
impl PartialEq for Begin
impl StructuralPartialEq for Begin
Auto Trait Implementations§
impl Freeze for Begin
impl RefUnwindSafe for Begin
impl Send for Begin
impl Sync for Begin
impl Unpin for Begin
impl UnwindSafe for Begin
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