[][src]Struct lib_ruby_parser::nodes::Begin

pub struct Begin {
    pub statements: Vec<Node>,
    pub begin_l: Option<Range>,
    pub end_l: Option<Range>,
    pub expression_l: Range,
}

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<Range>

Begin of the block

(1; 2)
~

None if the block of code is "implicit", like

if true; 1; 2; end
end_l: Option<Range>

End of the block

(1; 2)
     ~

None if the block of code is "implicit", like

if true; 1; 2; end
expression_l: Range

Location of the full expression

(1; 2)
~~~~~~

Trait Implementations

impl Clone for Begin[src]

impl Debug for Begin[src]

impl PartialEq<Begin> for Begin[src]

impl StructuralPartialEq for Begin[src]

Auto Trait Implementations

impl RefUnwindSafe for Begin

impl Send for Begin

impl Sync for Begin

impl Unpin for Begin

impl UnwindSafe for Begin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.